Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

splitting logic using LSMW

Former Member
0 Kudos
124

Hi gurus,

could anyone plz tell me the load logic and the splitting logic for the following scenario:

Conversion of General Ledger Balances from the various legacy systems into SAP. The balances will be loaded month for the current year only.

SAP has a Limitation of 999 line items per Document. If the conversion of the general ledger balance exceeds the 999 document line item limit, the record being loaded will need to be split into multiple documents to comply with size limitations.

The purpose of this document is to define General Ledger header and line item fields that will need to be populated.

could anyone plz tell me how 999 documents can be splitup from n number of records using LSMW.

1 REPLY 1

krishnendu_laha
Active Contributor
0 Kudos
52

Hi Karthik,

For handling this situtation:

1. First declare variable in global declaration wity type P

data: ws_numrec type p.

2. In the BEGIN_OF_RECORD of LSMW put this piece of code:

ws_numrec = ws_numrec + 1.

if ws_numrec GT 999.

transfer_transaction

endif.

Hope this will help you.

Regards

Krishnendu