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: 

How to handle line item for posting a document

Former Member
0 Kudos

Hello,

I am using a function module to post a document, so far I have hard coded all the values in the test program. I am passing two internal tables to the function module, one which has header data and the other which has line item data. So far I have written the following code to get the line item details:

it_bseg-BUKRS = '001'.
it_bseg-GJAHR = u20182010u2019.
it_bseg-BUZEI = '001'.
it_bseg-BSCHL = '31'.
it_bseg-WRBTR = '900'.
it_bseg-PSWSl = 'USD'.
it_bseg-SAKNR = u20180000123456u2019.
it_bseg-HKONT = u20180000123456u2019.
it_bseg-LIFNR = u2018001234567u2019.
append it_bseg to lt_temp_bseg.
clear it_bseg.


it_bseg-BUKRS = '001'.
it_bseg-GJAHR = '2010'.
it_bseg-BUZEI = '002'.
it_bseg-BSCHL = '40'.
it_bseg-WRBTR = '900''.
it_bseg-PSWSL = 'USD'.
it_bseg-KOSTL = '1111871234'.
it_bseg-XKRES = 'X'.
it_bseg-HKONT = '0000564738'.
it_bseg-FISTL = '1234556000'.
it_bseg-GEBER = '0000001'.
it_bseg-fkber = '0'.
append it_bseg to lt_temp_bseg.
clear it_bseg.

Now I want to get rid of the way I am handling the line item and want to handle it based on what user enters. For example right now only line item is being considered but if user enters two line items then what should be the approach.

Thank you,

Rajeev Gupta

1 REPLY 1

Former Member
0 Kudos

Any Suggestion.