Iam trying to upload hazardous substances with LSMW. I am using a BAPI method with:
Business Object BUS1077
Message Type SUBMAS
Basic Type SUBMAS01
I have been able to upload a substance, but only with header data. I am trying now to upload the identifiers. They are in a diferent structure in the IDOC taht result of processing the LSMW.
I have been reading a lot of "multiple lines" threads in this forum, and I have tried all ther opation: one file or two files...but i am not able to run correctly in any case.
I am going to explain my present situation, hope some of you could help me.
Source structures: 2 differents and the identifiers one in the lower level than the header one. (not at the same level because then the system will shown a message when assign structures and int eh convert step)
Source fields: each structure with their fields. I have add a rec_type field as the first field in each structure and assign the value 1 (header) and 2 respectly. Later, to each field also i have completed the Identifing Field Content.
Structure relations: the header one to the segment E1BP1077RH and the item one to E1BP1077RI
*Specify files: i have specify 2 differents files: one for the header information and one for the identifiers. Bot with the rec_type as first field.
I know that the relation between both segments is in the fields: RECN and RECNROOT. Then, the header field has the RECORD_NO for the header and the item has a RECORD_NO for each new line for each identifiers. And all the lines for the identifiers have the RECNROOT the same value than the RECORD_NO from the header.
Then, when import data, say me:
Source Structure Read Written Not Written
ZHR_HS_SUBSTANCE 1 1 0
ZHR_SUBSTANCE_IDENT 2 0 2
So, as the system has not created the item lines in the file, later only the header segment is created, so the substance is uploaded only with the header data.
What i am doing wrong?
I would appreciate your help. I have spent already a lot of time in this investigation.
Many thanks in advance