G/L Line item upload via LSMW BAPI
Lots of time I searched into the forum regarding the Customer/Vendor/General Ledger Line Items balance upload but I didn’t got a satisfactory answer and nor I got the complete document to understand how the process of BAPI will work in LSMW.
Every time we need to go for BDC to upload our Line items of Customer/Vendor / General Ledger.
Today I am going to create the complete process of General Ledger Line items upload via LSMW BAPI ( BAPI_ACC_GL_POSTING_POST).
T.code – LSMW
Now click on Setting- IDOC Inbound Processing or CTRL+ SHIFT +F1
Now on Next Screen Fill the Three Fields (File Port, Partn. Type, Partner No. )
Note:- This naming convention can be different in other systems.
Now click on Activate IDOC Inbound Processing
Now click on YES and once you get the Message “Data Saved”, then come back or press F3 to proceed to main screen. Below is the shot.
Now click on Execute or Press F8 to run the LSMW
Step 1. Maintain Object Attributes
Click on Save and come back
Step 2. Maintain Source Structures – Here we need to create the structures based on the BAPI. Here we are using the Business Object BUS6300 which belongs to Functional Module ( BAPI_ACC_GL_POSTING_POST ).
Below is the screenshot for your ready reference.
In the BAPI of G/L, We are having 3 Stages
- 1. Document Header
- 2. Line Items
- 3. Currency (Amount)
So I am going to Create three structure in LSMW.
Click on Save and come back
Step 3- Maintain Source Fields – Here we need to maintain the source fields which is available in the BAPI. We can find the list of Fields which comes up automatically by clicking on “Object Overview”, Below is the screenshot.
Copy all the field onto Excel File, as it becomes easy for you at the time of Field Assignment. Below is my excel sheet screenshot for your reference
Do the same for Item & Currency Field as well.
Now will move back again to LSMW and do the field assignment.
Click on Save and Come back.
Step 4- Maintain Structural Relations:- Here we will maintain the relationship between the Header, Line Item & Currency.
Now click on Fisrt Item (Currently Blue in Colour) and then click on “Relationship”
Now link the three one by one in a sequence. Below is the screenshot.
Then save and come back
Step 5;- Maintain Field Mapping and Conversion Rules
Now click on Extra —-> Auto Field Mapping or CTRL + SHIFT + F3
Mapping has been done correctly. Save and Come back.
Step 6; – Specify Files- Here we need to maintain the Three File structure for Header, Line Item & Currency (As per the BAPI)
Do the same process for all the 3 Files (Header, Line Item & Currency)
also change the name of Imported Data and Converted data to anything, else system sometimes gives the error due to this naming convention.
Click on Save & Continue.
Step 7:- Assign Files
Now again click on HEADERDATABAPI and click on Assignment and do the same for other two as well.
Click on Save and Back.
Step 7:- Read Data
Come back to main screen
Step 8:- Display Read Data
Step 9:- Convert Data – Select the only option “Create File” and execute
Step 10:- Display Converted Data
Step 11:- Start IDOC Generation
Step 12:- Start IDoc Processing
Click on Execute
Step 13:- Create IDoc Overview-
Kindly Review the attachment file31 & 32.
To see the Documents go to T.code FB03 & See the entries ( Kindly see the Attache File 33. PNG for your ready reference)
Now after all these steps we can see that the process has been completely done and without any issues.
In this document I tried to explain the process from very basic point of view.
I would also request you all to let me know if you need any help on this from my side.
Thank you all for your valuable support.