LSMW Using IDoc Type - Multiple Segments [SAP]
SAP ECC 6.0 - SAP_BASIS 700
Marc Laberge asked a question on SCN and I tried to help him. The question is “LSMW & IDOC - Multiple Constants in the Same Target Field”
I’m trying to create sales orders by using the IDOC ORDERS05 starting from a LSMW.
The only problem we have right now is that all Org Data in the IDOC is stored in a structure E1EDK14 IDoc: Document Header Organizational Data that contains two fields and need to be duplicated with different values.I’ve been able to load from file with a Source Structure Hierarchy but since the 3 entries I want to make are always the same for all Sales Orders, I was wondering if I could do it within LSMW without the need to have data in a external file.
So Basically, I need for every header these 3 entries :
Structure E1EDK14
QUALF - IDOC Qualifier –|– ORGID - IDOC Organization
008 –|– 0010
006 –|– 99
007 –|– 99Is there any way of doing this without development ?
Basically IDoc type ORDERS05 segment E1EDK14 should be populated three times for one transaction. But how can you do that with LSMW. LSMW gives only one E1EDK14 segment in target structure.
In this case you have to use __END_OF_RECORD__ event section and TRANSFER_RECORD global function to create three E1EDK14 segments in the IDoc.
Here is the example:
*Sales Organization
E1EDK14-QUALF = ‘008′.
E1EDK14-ORGID = ‘6720′.
transfer_record.*Sales Division
E1EDK14-QUALF = ‘006′.
E1EDK14-ORGID = ‘99′.
transfer_record.*Distribution Channel
E1EDK14-QUALF = ‘0007′.
E1EDK14-ORGID = ‘99′.
transfer_record.