Current Position:Home > BAPI SALES ORDER CHANGE CUSTOM FIELD

BAPI SALES ORDER CHANGE CUSTOM FIELD

Update:11-30Source: network consolidation
Advertisement
Hello Gurus,
I am trying to update a custom field for sales order. The field name is zfield1 in vbak. The field is added to vbakkom, vbakkomx, vbakkoz, vbakkozx, BAPE_VBAK, BAPE_VBAKX. I guess i need to use the EXTENSIONIN table to populate this field's values to change it with the BAPI. But I not sure exactly how to populate the fields. Can someone tell me how exactly i need to do this?
Also the documentation says fill Extensionin this way.
STRUCTURE VALUEPART1 1234561234567890123
BAPE_VBAP 0000004711000020 XYZ
BAPE_VBAPX 0000004711000020 X
What is the 1234561234567890123? Is it a field?
Thanks,
KB

The Best Answer

Advertisement
Hi,
Check this example..I am updating the VBAP field..Instead you can replace it for VBAK..
PARAMETERS: P_VBELN TYPE VBAK-VBELN.
DATA: T_LINE LIKE BAPISDITM OCCURS 0 WITH HEADER LINE.
DATA: T_LINEX LIKE BAPISDITMX OCCURS 0 WITH HEADER LINE.
DATA: T_EXTEN LIKE BAPIPAREX OCCURS 0 WITH HEADER LINE.
DATA: T_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
DATA: BAPE_VBAP LIKE BAPE_VBAP.
DATA: BAPE_VBAPX LIKE BAPE_VBAPX.
DATA: ORDER_HEADERX LIKE BAPISDH1X.
ORDER_HEADERX-UPDATEFLAG = 'U'.
T_LINE-ITM_NUMBER = '000010'.
APPEND T_LINE.
T_LINEX-ITM_NUMBER = '000010'.
T_LINEX-UPDATEFLAG = 'U'.
APPEND T_LINEX.
BAPE_VBAP-VBELN = P_VBELN.
BAPE_VBAP-POSNR = '000010'.
<b>BAPE_VBAP-<b>YYFREETEXT</b> = '02'.</b>
T_EXTEN-STRUCTURE = 'BAPE_VBAP'.
T_EXTEN+30 = BAPE_VBAP.
APPEND T_EXTEN.
BAPE_VBAPX-VBELN = P_VBELN.
BAPE_VBAPX-POSNR = '000010'.
<b>BAPE_VBAPX-YYFREETEXT = 'X'.</b>
T_EXTEN-STRUCTURE = 'BAPE_VBAPX'.
T_EXTEN+30 = BAPE_VBAPX.
APPEND T_EXTEN.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = p_vbeln
order_header_inx = ORDER_HEADERX
tables
return = T_RETURN
ORDER_ITEM_IN = T_LINE
ORDER_ITEM_INX = T_LINEX
EXTENSIONIN = T_EXTEN.
COMMIT WORK.
Thanks,
Naren
  • BAPI SALES ORDER CHANGE CUSTOM FIELD Update:11-30

    Hello Gurus, I am trying to update a custom field for sales order. The field name is zfield1 in vbak. The field is added to vbakkom, vbakkomx, vbakkoz, vbakkozx, BAPE_VBAK, BAPE_VBAKX. I guess i need to use the EXTENSIONIN table to populate this fiel

  • How to Generate sales orders with custom Fields using BAPI_BUSPROCESSND_CREATEMULTI Update:10-11

    Hi, I need to generate sales orders with custom fields on table CRMD_ORDERADM_H using BAPI_BUSPROCESSND_CREATEMULTI, after changing the structure BAPI_TE_CRMD_ORDERADM_H, and feed the  EXTENSIONIN table of the BAPI with data, the order is created, bu

  • MRP Generated production orders greys out Sales Order and Customer fields Update:11-30

    Hi there, The MRP generated production orders greys out the Sales Order and Customer fields for some reasons. These fields are really important as they link the production order to the sales order and the customer's purchase order. Could the SAP team

  • MRP - Sales order and customer fields grey-out Update:11-30

    Hi there, The Sales order and customer fields are grey-out for all MRP generated production orders. Can the SAP programmers please get this fixed? It should either read in the sales order number and the customer number or allow user to type in the sa

  • Sale Order Item : Custom Field : Table Control Update:10-11

    I have added two fields to sale order item table control in program SAPMV45A screen no . 4900. Now the field which i have added are working fine while creating sale order but while changing those fields are not changing. condition is like this: the c

  • Customize bapi for sales orders with customer fields Update:11-30

    The situation is a following. Customer has added a structure on table VBAP. They used Append but without include. Now I have to make a BAPI that will be able to write on those fields. I have used several posts and documentation, but with on change :

  • Userexit in BAPI sales order creation Update:11-30

    HI all,   My requirement is one SERIALNUMBER field add BAPI salesorder creation. That field not existed in satndard BAPI structures.BAPI input XML file. Salesorder>extras(menu)>Technical object->serialmumber[RIPW0SERNR). please give any enhanceme

  • Sales order CARRIER TEXT field Update:10-11

    Hi, I am creating query through SQVI, I would like to use sales order carrier text field with the query.please advice which table and field should I use for query ? Thanks in advanceSorry, by mistake I posted the message again. Pls ignore it. Hi JK,

  • How to make a field in sales order a required field Update:10-11

    Hi, How do i make a certain field in sales order a required field. I want to make the assignment field in accounting tab a required field. How do i configure this. Thank you. RachelleIn you know the Transaction and screen Variant Configurations. Use

  • Table name for sales order with Customer info Update:10-11

    Hi Gurus, Could you please provide me table name for  sales order with customer no and customer name. I have list of sales order number (more than 1000 no's ) i need to identify customer number and customer name (ship to party and sold to party infor