Application Development and Automation 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:Ā 
Read only

LSMW - Maintain Source Fields

sridhar_muthekepalli3
Active Contributor
0 Likes
1,970

Dear Friends,

In LSMW, Maintain Source Fields, The system is not allowing me to maintain same field twice.

For Ex: For  Transaction code FB01, Posting key field NEWBS has to maintained twice both of debit and credit, means posting key 01 for customer and posting key 50 has to maintained for GL Account.

For both posting keys 01 & 50 field NEWBS is required.

I clicked on Fields with the same name. But it does not work.

Please suggest.

Regards

Sridhar

4 REPLIES 4
Read only

Former Member
0 Likes
1,167

Hi

Your input structure should have a field for posting key, if you want to manage it in mapping step you should write a routine in order to decide which posting key to be set.

Max

Read only

atul_mohanty
Active Contributor
0 Likes
1,167

Hi -

Create two fields NEWBS and NEWBS1 in the source structure.

Regards,

Atul Mohanty

Read only

sridhar_muthekepalli3
Active Contributor
0 Likes
1,167

Hi Atul,

I have created two fields NEWBS and NEWBS1 in the source structure.But i am running the batch input, for NEWBS1, the posting key 50 is not getting inputted but posting 01 is getting displayed which is wrong.

Please suggest.

Regards

Sridhar

Read only

0 Likes
1,167

Hi Sridhar - Thanks for your mail. It seems you are facing the problem in mapping your source structure to BBSEG structure in LSMW while mapping the posting key. I would suggest the following steps to resolve your issue.

1. Create a structre HEADER and another stucture ITEM (lower level to header) in the step 2 (Maintain Source Structures) of LSMW.

2. In Step 3( Maintain Source Structures) of LSMW , now create source field with first field as Indicator ( 1 char) following the header data fields and line item field (keep just one field for NEWBS) .

3. Now to post the records through LSMW for FB01, your file should look like this for 1 transaction, it should have three records as follows

   H ( header fields)

   I    01 ( item fields)

   I    50 ( other fields 
4. Now in step 4 LSMW assign HEADER to BBKPF and ITEM to BBSEG

5. In in step 5 LSMW , BBKPF-STYPE = '1' and BBSEG-STYPE = '2' . Here you can mention  BBSEG-NEWBS = ITEM-NEWBS.

This should help you to resolve your issue. Please try the above steps.

But again if you want to just go with one structure for your file with two fields NEWBS and NEWBS1. Then try to add one BBSEG record after the end of record / transfer record of BBSEG with one more line (for NEWBS1) with coding.

Let me know, if it helps.

Regards,

Atul Mohanty