on 10-11-2007 10:40 PM
Hello All,
I am currently working on a scenario where the data is coming from a external system for goods receipts and reversal of goods receipts for purchase orders. I am using a bapi_goodsmvmt_create(IDOC is MBGMCR). Can I use the same function module for the reversal of goods receipts too? Actually, the external system is sending "Accepted" if its a goods receipt (movement type = 101) and "Rejected" if its reversal (movement type =102). Can I use the fix value conversion to map this two fields like accepted - fixed value 101, rejected - fixed value 102. Also, Do I need to fill the IDOC control records during the mapping or if it takes the values from the XI message header automatically?
Looking forward to hearing from you all. Please help me.
Regards,
Shalini.
Hi ,
You don't need to use any value mapping ...i.e. you can accomplish the same using ...standard mapping function...i.e.
Let us just say if you recieve "Accepted / Rejected " ...compare it with a constant value
"Accepted/Rejected" and based on the result send the movement type value (101/102) to the corresponding BAPI/IDOC interface field.
Now that way you can use the same BAPI or idoc ...whichever you prefer.
But first be clear about what you want to use ...BAPI or IDOC .
If you are using IDOC then you can use the following approach.
During mapping :
Control Records :
Specify TABNAM--- EDI_DC40
MANDT --- Here based on the business system based on DEV ,QA,PRD...specify the client...
i.e. choose standard function reciever ...and check if reciever is equal to the name of business system for dev ..then specify the client for dev ..and so forth (QA , PRD).
In the field direct specify ... constant value 1.
in the idoctyp : specify the idoctype name.
in mestyp :specify the messsage type name.
in the field SNDPOR just like the mandt field check the reciever and specify sender port of dev ,qa and prd .
in the field sndprt : specify LS.
in sndprn : just like the mandt field check the reciever and specify sender partner number for dev qa and prd
in the rcvpor : just like the mandt field check the reciever and specify reciever port for dev qa and prd .
in rcvprt : LS
In RCVPRN :just like the mandt field check the reciever and specify reciever partner number for dev qa and prd .
In communication Channel in Directory:
Check these two enteries :
Apply control record values from payload.
TAKE sender for payload.
Best of Luck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
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.