2008 Jul 16 2:59 AM
Hi guys,
I am using BAPI_SALESORDER_CREATEFROMDAT2 but i need put the value of field Ship-to party(KUNNR) but i can´t find the structure. Anyone knows in which structure can I find it?
Regards.
Thanks in advance.
MArisol
2008 Jul 16 3:55 AM
Hi
This is the structure BRFCKNA1.
Reward if useful.
Regards
Divya
2008 Jul 16 3:55 AM
Hi
This is the structure BRFCKNA1.
Reward if useful.
Regards
Divya
2008 Jul 16 3:59 AM
Hi,
You need to enter in ORDER_PARTNERS tables parameter.
Check the FM documentation for further assistance.
Regards,
Subramanian
2008 Jul 16 4:04 AM
Hi
Check out these structures too BAPISDHD1,BAPISDITM,BAPIPARNR,BAPISCHDL
Regards
Divya
2008 Jul 22 4:14 AM
Hi, Marisol
The structure is under parameter ORDER_PARTNERS whose associated type is BAPIPARNR.
So first of all, you have to define a standard table and a work area in you program.
it_order_partners TYPE STANDARD TABLE OF bapiparnr,
wa_order_partners LIKE LINE OF it_order_partners,
Then, check the structure BAPIPARNR, you can find two field: PARTN_ROLE(Partner function) and PARTN_NUMB(Customer Number 1). You can check the field PARVW of Transparent Table TPAR to find which Partner function represent the SHIP TO PARTY.
For example:
I found 'WE' is one of the Partner function of ship to party(there are more than one Patner function represent SHIP TO PARTY, you can try them one by one to see the message given by BAPI_SALESORDER_CREATEFROMDAT2's parameter RETURN, then you will find a compatible one), so when I assign 'WE' to PARTN_ROLE, the number I move to PARTN_NUMB is ship to party id.
wa_order_partners-partn_role = 'WE'.
wa_order_partners-partn_numb = '0000001000'.
append wa_order_partners to it_order_partners.
Hope it will help.
Best Regards,
Stephanie