SAP BLOG Create Data File for Inventory Count with Batch-Input Method

SAP Blog

Kayıtlı Üye
Katılım
22 Ara 2017
Mesajlar
1,925
Tepki puanı
7
Puanları
6
I just want to share some tips when creating the data file for Inventory Count with Batch-Input Method. Some of you might have read the tutorial from Jürgen Lins. Here, I am using the MI39 transaction.

As the tutorial explained, we have to create text file respecting the field length of the BISEG structure. Natively, this cannot be done with Excel. But with some workaround, we can create it.

My objective here is to create a blank template file with guidance for users to input the inventory count data.

First, we need to know the field sequence and field length of structure BISEG. Check with SE11.

saplogon_TazDYO9ybB.png


BISEG Structure​

Copy and transpose this structure; the field name, field length, and description to an empty Excel file. These serves as table headings. We can use them to help adjusting the column width and later as field guidance when users want to input the data.

EXCEL_o3s2QijcnE.png


Excel File with BISEG Structure​

Adjust each column width with the respective field length from BISEG. For example here, BLDAT length is 8, so adjust the column width to 8. Do this to all fields.

EXCEL_PSf2ii0REP.png


Example BLDAT Length 8​

At this point we have create a blank template inventory count file. I recommend to protect the sheet before giving this file to users, so that they cannot change the column width. This is very important as the batch input method cannot work with incorrect column width / field length.

EXCEL_RFRvECllKm.png


Protect the Sheet​

But checked/marked the “Delete Rows” option, because later we need to remove the headings, as it is only to be used for data input guidance.

EXCEL_Ud77xS8DEh.png


Allow Delete Rows​

Now, users can input the inventory count data in that file, with the help of the field description as guidance.

Tips: be sure to have the same/one pair of plant and storage location code in the table or data lines, or else SAP will automatically split the inventory count document when different code is detected between the lines.

EXCEL_i2LamXdLz4-1.png


Data Table Populated​

When the file is completed and ready to be uploaded to SAP, the headings can be deleted, as it is no longer needed.

EXCEL_RR91WJSAWd.png


Delete Headings​

Then the data file is (almost) ready.

EXCEL_yURsaHOi6t.png


Data Ready​

We need to export or save this file to formatted file with space delimited format, or PRN.

Picture1-4.png


Save as PRN File​

If you open this PRN file with Excel, it will lose the column width. But If you open this PRN file with notepad, it will have the field length needed for batch input.

Tips: you can also use Notepad++ to edit the file after it has been exported to PRN. Notepad++ can show you the cursor/pointer coordinate so you can check if any field’s starting position has been misplaced after editing.

Picture2.png


Open with Notepad​

Finally you can use this file in the batch input proses, by uploading it with CG3Z. Be sure to check the correct target name “phyinv39_40” and select “ASC” as format.

Picture3.png


Upload with CG3Z​

Check the message after the file upload is finished.

Picture4.png


Finished Upload​

After that, proceed to execute the MI39. Be sure to check the maximum number of items not exceeding 333, as it is the limit of lines for each document. Here, I use 300. You can also use the “Test Data” option before the real execution.

Picture6.png


Ready for MI39​

A session will be created. Number of items will match the number of lines in the file. Proceed to process the session.

Picture7.png


Session Created​

The rest of the process will be done similarly to any other batch input via SM35.

Picture8.png


Session Overview​

Picture9.png


Process Session​

If all goes well, system will pop the completion message.

Picture10.png


Session Done​

And it is done. Check the result as usual, from MI22, MI24, MB51, MB52. As I have mention in the beginning, this whole example is done for MI39 but I am sure it is applicable to other inventory count batch input method.

Leave a comment if you have any feedback, and check out the SAP MM Community for other inquires. Thank you.

Okumaya devam et...
 
Üst