Hi Team,
I'M using bapi SD_SALESDOCUMENT_CREATE for creating sales order.
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
EXPORTING
sales_header_in = w_sales_head
sales_header_inx = w_sales_headx
status_buffer_refresh = abap_false
IMPORTING
salesdocument_ex = lv_vbeln
sales_header_status = w_sales_headstat
TABLES
return = lt_return
sales_items_in = lt_sales_itms
sales_items_inx = lt_sales_itmsx
sales_partners = lt_sales_parnrs
sales_schedules_in = lt_sales_schd
We are filling lt_sales_parns as below:
lw_parnrs-PARTN_ROLE = 'WE'
lw_parnrs-PARTN_NUMB = '12345'
lw_parnrs-ADDRESS = '1034452'
this ADRNR 1034452 is maintained in ADR2 table. The partner is maintained in IHPA table.
once the sales order is created it is fetching from ARD2 table for our passed adrnr and the same appearing in the partners tab in the sales order item.
Now my requirement is i need to change the telephone number.
I tried to give in like
lw_parnrs-telphone = '98021654454'.
But it is still picking up from ADR2 against the ADRN2 passed.
if i dont passed ADRNR value and pass all telephone etc , it is giving error : 'Specify either address number or address'.
Can you suggest me any exit or enhancement or any badi inside BAPI 'SD_SALESDOCUMENT_CREATE' , So that i can change the telephone or replace telephone number which is coming from ADR2 table for the provided ADRNR.
Thanks,
Priya Ramani.