on 10-05-2009 3:47 AM
Hi everyone,
I am using a IDOC to Flat File scenario
IDOC is PO Idoc.
Flat file should contain n no of records For example if IDOC of a PO contains 3 Line Item Flat file should have 3 records...
Suppose , my flat file has 3 fields
PO #
Item #
Material #
Now How to achieve this ?
Thanks.
Use UseOneASMany standard function and map as given below
E1EDK01-BELNR (context E1EDK01) ------------------------\
E1EDP01 -------------------- ----------------------------- >useoneasmany ---> target PO field
E1EDP01-POSEX (context E1EDP01) ---------------------/
because you use function useOneAsMany() if a field that only occurs once needs to be replicated as often as another field occurs in the outbound message so that the fields can be written to the target structure in pairs as a record.
it takes three inputs
first input values to be replicated
second input for how often values to be repeated(Occurence)
third input How to structure the values(in your case you have to repeat values as often as E1EDP01 occurs and structure should be as Item or material field)
Edited by: Kubra fatima on Oct 7, 2009 8:44 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If your target structure is
MT_Target
Details
PO #
Item #
Material #
Map source segment, suppose Segment A, (which has the line item) to Details
Just do the direct assiagnment for the field inside Segment as
Segment A-PO field -> PO#
Segment A-item field ->item#
refer this link for how to use FCC at receiver file adapter
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your replies.
My Target structure is like this
MT_Target
Details
PO #
Item #
Material #
PO # is coming from the Header segment from the Source side ( For eg E1EDK01)
Item & Material are coming from Item Level ( for eg E1EDP01 )
Now , If I map 'Details' to E1EDP01 ,
For Example : If source IDOC has 2 Line Items , it will contain 1 E1EDK01 & 2 E1EDP01 ,
Now when I test this in Message Mapping Tool, It does give me 2 Details line but in the second 'Detail' it only contains Item & Material and Not the PO#.
Thanks ,
Hi,
since you have only one source field E1EDK01-BELNR for many line item fields. PO (in target) will be created only once.
Unless you use the node function useoneasmany. Check the documentation here
http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/content.htm
and map the field like
E1EDK01-BELNR (context E1EDK01) ----
E1EDP01 (context IDOC)------------------- useoneasmany --------PO#
E1IDPO1--------------------------------------
Regards
suraj
Hi Bhandari,
>>Flat file should contain n no of records For example if IDOC of a PO contains 3 Line Item Flat file should have 3 records...
What is your target structure look like?
Suppose it is :
--MT_XYZ
--Details
---PO #
---Item #
---Material #
Map source segment, suppose Segment A, (which has the line item) to Details
And the field inside
Segment A-PO field -> splitbyValue-> PO#
Segment A-item field -> splitbyValue-> item#
and so on..
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.