EXTENSIONIN PARAMETER IN BAPI_RESERVATION_CREATE1
Hi Experts,
I need the extension structure name to use when I have custom fields during the creation of a reservation via the BAPI, BAPI_RESERVATION_CREATE1.
The thing is I am creating the reservation from srm, but for my cuf fields to be displayed, I need to pass them through the BAPI extension structure. I have tried all sorts of structures and they do not work.
I need your help guys.
Thabo.
Edited by: Thabo Matsepe on Nov 25, 2008 1:10 PM
Hi,
In the EXTENSIONIN param Structure should be BAPI_TE_XXXXX(Which has the custom fields) .
If you don't know one in se11 search with BAPI_TE_* , I am sure you will one which has ur fields.
And then in Value part1 should have your data.
For Ex. you want to send company code , asset no.
first4 will be your comp code , Next 12 will ur Asset no .
Please revert back if more help required.
Also Check for similar work
[Thread|https://forums.sdn.sap.com/click.jspa?searchID=19143539&messageID=6381845]
Rhea.
Edited by: rhea on Nov 25, 2008 3:31 PM
Edited by: rhea on Nov 25, 2008 3:31 PM
Similar Messages
-
Urgent: Bapi_po_change Extensionin Parameter...
Hi ,
I want to update a Zfield created in Database using BAPI_PO_CHANGE.
It would be more helpfull. IF any one can give a sample code for that ...
i have done the coding but the field is not getting updated ..
It will helpfull..if i can get the steps and any additional things to be done ....
i have used Extensionin parameter....Hi Gokul,
Check the following link on Bapi_po_change, It's a sample program.
http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm
reward points if helpful. -
Problems in the EXTENSIONIN Parameter of BAPI_PO_CREATE1
Hello Experts,
I have a cfeild in the table EKKO and want to fill it.
I have try it over the EXTENSIONIN Parameter of BAPI_PO_CREATE1, but it doesn't work.
The strucurtes BAPI_TE_MEPOHEADER and BAPI_TE_MEPOHEADERX has also the required customerfields included
Some Ideas? why it doesn'works ?
Thanx in Advance
REPORT Z_BAPI_PO_CREATE1.
DATA: LS_POHEADER TYPE TABLE OF BAPIMEPOHEADER WITH HEADER LINE .
DATA: LS_POHEADERX TYPE TABLE OF BAPIMEPOHEADERX WITH HEADER LINE.
DATA: LT_RETURN type TABLE OF BAPIRET2.
DATA: LT_POITEM TYPE TABLE OF BAPIMEPOITEM WITH HEADER LINE.
DATA: LT_POITEMX type TABLE OF BAPIMEPOITEMX WITH HEADER LINE .
DATA: LT_ACCOUNT type TABLE OF BAPIMEPOACCOUNT WITH HEADER LINE .
DATA: LT_ACCOUNTX TYPE TABLE OF BAPIMEPOACCOUNTX WITH HEADER LINE .
DATA: LT_ADDRDELIV type BAPIMEPOADDRDELIVERY .
*********************Setze HEADER**************************
LS_POHEADER-DOC_TYPE = 'Z028'.
LS_POHEADER-CREAT_DATE = '01032006'.
LS_POHEADER-ITEM_INTVL = '00001'.
*LS_POHEADER-VENDOR = '0021000000'.
LS_POHEADER-SUPPL_PLNT = '4700' .
LS_POHEADER-PURCH_ORG = '2700' .
LS_POHEADER-PUR_GROUP = '701' .
LS_POHEADER-CURRENCY = 'EUR' .
APPEND LS_POHEADER .
*********************Setze HEADERX**************************
LS_POHEADERX-DOC_TYPE = 'X' .
LS_POHEADERX-CREAT_DATE = 'X' .
LS_POHEADERX-ITEM_INTVL = 'X' .
LS_POHEADERX-SUPPL_PLNT = 'X' .
*LS_POHEADERX-VENDOR = 'X' .
LS_POHEADERX-PURCH_ORG = 'X' .
LS_POHEADERX-PUR_GROUP = 'X' .
LS_POHEADERX-CURRENCY = 'X' .
APPEND LS_POHEADERX .
*********************Setze ITEMS**************************
LT_POITEM-PO_ITEM = '00001' .
LT_POITEM-MATERIAL = '023JK513' .
LT_POITEM-PLANT = '4700' .
LT_POITEM-STGE_LOC = '7001' .
LT_POITEM-QUANTITY = '1' .
LT_POITEM-PO_UNIT = 'PC' .
LT_POITEM-ACCTASSCAT = 'K' .
LT_POITEM-PERIOD_IND_EXPIRATION_DATE = 'D' .
APPEND LT_POITEM .
*********************Setze ITEMSX**************************
LT_POITEMX-PO_ITEM = '00001' .
LT_POITEMX-PO_ITEMX = 'X' .
LT_POITEMX-MATERIAL = 'X' .
LT_POITEMX-PLANT = 'X' .
LT_POITEMX-STGE_LOC = 'X' .
LT_POITEMX-QUANTITY = 'X' .
LT_POITEMX-PO_UNIT = 'X' .
LT_POITEMX-PERIOD_IND_EXPIRATION_DATE = 'X' .
LT_POITEMX-ACCTASSCAT = 'X' .
APPEND LT_POITEMX .
*********************Setze ACCOUNTPARAMETER**************************
LT_ACCOUNT-COSTCENTER = '1301000001' .
LT_ACCOUNT-PO_ITEM = '00001' .
APPEND LT_ACCOUNT .
LT_ACCOUNTX-COSTCENTER = 'X' .
LT_ACCOUNTX-PO_ITEM = '00001' .
APPEND LT_ACCOUNTX .
DATA: ls_bapi_te_po_header type BAPI_TE_MEPOHEADER,
ls_bapi_te_po_headerx type BAPI_TE_MEPOHEADERX,
ls_bapi_extension type BAPIPAREX,
it_bapi_extension type table of BAPIPAREX WITH HEADER LINE.
********************Setze EXTENSIONIN**************************
ls_bapi_extension-structure = 'BAPI_TE_MEPOHEADER' .
*ls_bapi_te_po_header-po_number = '' .
ls_bapi_te_po_header-cfield = '8204' .
ls_bapi_extension-valuepart1 = ls_bapi_te_po_header .
append ls_bapi_extension to it_bapi_extension .
clear ls_bapi_extension .
ls_bapi_extension-structure = 'BAPI_TE_MEPOHEADERX' .
*ls_bapi_te_po_header-po_number = '' .
ls_bapi_te_po_headerx-cfield = 'X' .
ls_bapi_extension-valuepart1 = ls_bapi_te_po_headerx .
append ls_bapi_extension to it_bapi_extension .
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
POHEADER = LS_POHEADER
POHEADERX = LS_POHEADERX
TABLES
RETURN = LT_RETURN
POITEM = LT_POITEM
POITEMX = LT_POITEMX
POACCOUNT = LT_ACCOUNT
POACCOUNTX = LT_ACCOUNTX
EXTENSIONIN = it_bapi_extension
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.Hello,
thank you for your response
The Problem was on the BADI below:
it wasn't implemented.
BAPI_PO_CREATE1->PERFORM move_data_in ->PERFORM move_extensionin->PERFORM move_container_in->CALL BADI lr_badi->map2i_extensionin
CALL BADI lr_badi->map2i_extensionin
EXPORTING
im_container = im_container
im_name = im_name
im_error = lf_exit
CHANGING
ch_struc = ch_struc.
Best Regards -
Extensionin parameter in the Production Order Confirmation BAPI
Hi All,
I am looking for a Production Order Confirmation BAPI which has the Extensionin parameter to append values for custom fields in table AFRU.
But i could not find one with the Extensionin parameter.
Please let me know if there is any option or any other Production Order Confirmation BAPI which can meet this requirement.
Thanks in Advance.
Jaffer Ali.SFirst off, thanks for these posts. Worked for me, too.
Let me just add a little more clarification:
1) First you call BAPI_PRODORDCONF_GET_HDR_PROP
2) Then you must update the field ENTRY_QNT from the internal table you pass in to "goodsmovements" because function BAPI_PRODORDCONF_GET_HDR_PROP wipes that field out and you will miss the posting without this filled
3) Then you call BAPI_PRODORDCONF_CREATE_HDR with the same internal table you got back from the first function inclusive of you putting back ENTRY_QNT.
4) Commit work and wait.
So, in summary, the first fm is needed and the first fm changes some fields in the "goodsmovements" internal table that you really need to get the posting to work in the second fm.
And one more thing, the exact function that an earlier posted referenced to find out that both of the functions in this note were called together is: PP_CATT_CONFBAPI_HDR.
Message was edited by:
Kenneth Goldstein -
Extensionin parameter in BAPI_COSTCENTER_CREATEMULTIPLE
Hi,
I have created a BAPI "BAPI_COSTCENTER_CREATEMULTIPLE" and cost centers are created successfully but Custom fields are not updated. the below is the codePlease, help me.
DATA: t_cclist TYPE STANDARD TABLE OF bapi0012_ccinputlist,
wa_cclist TYPE bapi0012_ccinputlist,
t_extin TYPE STANDARD TABLE OF bapiparex,
wa_extin TYPE bapiparex,
t_ret TYPE STANDARD TABLE OF bapiret2,
wa_ret TYPE bapiret2.
wa_cclist-costcenter = 'TST413'.
wa_cclist-valid_from = sy-datum.
wa_cclist-valid_to = '99991231'.
wa_cclist-person_in_charge = 'DEVON'.
wa_cclist-department = '000000032328'.
wa_cclist-costcenter_type = 'O'.
wa_cclist-costctr_hier_grp = 'FLD0000006'.
wa_cclist-comp_code ='0132'.
wa_cclist-profit_ctr = 'P0000016'.
wa_cclist-addr_title = 'TITLE'.
wa_cclist-addr_name1 = 'NAME 1'.
wa_cclist-addr_city = 'NAME 2'.
wa_cclist-addr_district = ' '.
wa_cclist-addr_country = 'CA'.
wa_cclist-addr_region = 'BC'.
wa_cclist-jv_venture = '100000'.
wa_cclist-jv_rec_ind = 'BI'.
wa_cclist-jv_equity_typ = 'E01'.
wa_cclist-jv_otype = 'C001'.
wa_cclist-name = 'MANATOKAN HOL 100/06'.
wa_cclist-descript = 'MANATOKAN HOL 100/06C-14-62-6W4M SL5-14'.
APPEND wa_cclist TO t_cclist.
CLEAR wa_cclist.
Move custom fields to BAPI strcture
CLEAR wa_extin.
wa_extin-structure = 'BAPI_TE_CSKS'.
wa_extin-valuepart1+0(10) = 'TST413'. "Cost Center
wa_extin-valuepart1+10(4) = '100'. "Acquisition
wa_extin-valuepart1+14(4) = ''. "Divestiture
wa_extin-valuepart1+16(4) = ''. "Company Prior to Rollup
wa_extin-valuepart1+20(20) = ''. "Cost Center Groupings
wa_extin-valuepart1+40(2) = ''. "Business Segment
wa_extin-valuepart1+42(6) = ''. "Exploratory Play
wa_extin-valuepart1+48(38) = ''. "Peep GUID
wa_extin-valuepart1+86(3) = ''. "Surface Location Unique Well Identifier Survey System
wa_extin-valuepart1+89(16) = ''. "Surface Location Unique Well Identifier UWI
wa_extin-valuepart1+105(25) = 'DEVON ENERGY CORPORATION'. "Acquisition Description
wa_extin-valuepart1+135(25) = ''. "Divestiture Description
wa_extin-valuepart1+160(30) = ''. "Cost Center Groupings Description
wa_extin-valuepart1+190(15) = ''. "Business Segment Description
wa_extin-valuepart1+205(25) = ''. "Company Prior to Rollup Description
wa_extin-valuepart2+0(30) = ''. "Exploratory Play Description
wa_extin-valuepart2+30(10) = '20110607'. "Effective Date of Sale
wa_extin-valuepart2+40(10) = '20110607'. "Closing Date
wa_extin-valuepart2+50(10) = '20110607'. "Post Close/Binding Date
wa_extin-valuepart2+60(8) = '25'. "Location :Latitude
wa_extin-valuepart2+68(1) = 'N'. "Location:Latitude Direction
wa_extin-valuepart2+69(9) = '36'. "Location:Longitude
wa_extin-valuepart2+77(1) = 'S'. "Location:Longitude Direction
wa_extin-valuepart2+78(3) = 'DLS'. "Unique Well Identifier: Survey System
wa_extin-valuepart2+81(16) = '100052006908600'. "Unique Well Identifier: UWI
wa_extin-valuepart2+97(10) = ''. "Service Provider
wa_extin-valuepart2+107(6) = 'PROD'. "Status
wa_extin-valuepart2+113(10) = 'ARL SUCC'. "Tax Successor Code
wa_extin-valuepart2+123(10) = 'DEV01OCT14'. "Tax Stream Pool
wa_extin-valuepart2+133(14) = '100'. "Percent
wa_extin-valuepart2+147(35) = ''. "Service Provider Description
wa_extin-valuepart2+182(20) = 'PRODUCING'. "Status Description
wa_extin-valuepart2+202(15) = 'ARL SUCCESOR'. "Tax Successor Description
wa_extin-valuepart3+0(40) ='DEVON ACQD AFTER 2001-10-14'. "Tax Stream Pool Description
APPEND wa_extin TO t_extin.
CLEAR wa_extin.
CALL FUNCTION 'BAPI_COSTCENTER_CREATEMULTIPLE'
EXPORTING
controllingarea = 'D001'
TESTRUN = ' '
MASTER_DATA_INACTIVE = ' '
LANGUAGE =
TABLES
costcenterlist = t_cclist
return = t_ret
extensionin = t_extin.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Thanks,
Deepthi.Custom fields are updated now. I have created one BADI and moved into strctures.
-
BAPI_SALESORDER_CREATEFROMDAT2 EXTENSIONIN
Hi,
i want to create a SO by using bapi BAPI_SALESORDER_CREATEFROMDAT2 .
Table vpap consists of an append structure ZAVBAP that into i put customer fields eg ZXXXXX type char.
How do i fill EXTENSIONIN ?
TahnksHi Sezer,
I think the documentation of the function module helps u a lot for acheiving ur requirement. In that it is clearly given. See the below:
The following description uses an example to explain how to proceed with customer enhancements to the SD tables VBAK, VBKD, VBAP and VBEP.
The customer has added their own fields to table VBAP using the INCLUDE structure CUTEST. This structure contains 2 fields:
CFIELD1, CHAR 10
CFIELD2, CHAR 3.
The customer also requires that these two fields can be maintained with the BAPI.
1. Maintain structure CUTEST in table VBAP
2. Because the BAPIs work with checkboxes, you must also define a CUTESTX checkbox for the customer structure. It should be structured like this:
Field name Data element
CFIELD1 CHAR1
CFIELD2 CHAR1
3. Define these customer structures in the structures VBAPKOZ und VBAPKOZX using INCLUDE or APPEND.
4. Add the customer structures to the BAPE_VBAP and BAPE_VBAPX BAPI structures using the APPEND technique.
5. Adjust the following structures for customer enhancements to table VBAK:
a) VBAKKOZ
b) VBAKKOZX
c) BAPE_VBAK
d) BAPE_VBAKX
6. Adjust the following structures for customer enhancements to table VBEK:
a) VBEPKOZ
b) VBEPKOZX
c) BAPE_VBEP
d) BAPE_VBEPX
7. Generally, the data should be added to the BAPI interface in the internal communication structures (VBAKKOM, and so on). There, you can process the data in the SD tables (VBAK, and so on).
8. If the EXTENSIONIN parameter contains customer data, you must complete at least the key fields in the relevant standard parameters.
For example:
You want to change customer field VBAP-CFIELD2 for item 20 to "XYZ" in order 4711.
The following entries are expected:
Import: BAPIVBELN-VBELN = '0000004711' Document number
BAPISDHD1X-UPDATEFLAG = 'U' UPDKZ for doc header
Tables: BAPISDITM-ITM_NUMBER = '000020' Item number
BAPISDITMX-ITM_NUMBER = '000020' Item number
+ BAPISDITMX-UPDATEFLAG = 'U' UPDKZ for item
You must complete the EXTENSION table as follows:
STRUCTURE VALUEPART1 1234561234567890123
BAPE_VBAP 0000004711000020 XYZ
BAPE_VBAPX 0000004711000020 X
In the above example, it is from scratch, this helps u a lot. Double click on ExtensionIN of the function module documetation and check out.
Regards,
Adithya K
Yash Technologies Pvt. Ltd.
Note: Don't forget to reward points if suggestion is useful. -
How to create the INBOUND Function Module for INBOUND IDOCs
Hi Friends,
Can any Suggest me How to proceed to Create an INBOUND Function Module for Processing the INBOUND IDOCS
which are recieved from XI Server ?
I am working in SAP-ISU
Here i will recieve the INBOUND IDOCs for the Meter Reading Orders.
We have a Standard INBOUND FUNCTION MODULE
IDOC_INPUT_ISU_MR_UPLOAD
which Uploads the Meter Reading Results.
I copied the Same function Module into ZIDOC_INPUT_
and working on it.
Can any one suggest me, whether i am going in correct way or not.
In IDOC_INPUT_ISU_MR_UPLOAD Inbound fun module,
BAPI_MTRREADDOC_UPLOAD is used to Update or Insert the Meter Reading Results,
My requirment is to Insert and Update the Meter Reading Orders which are Inbounded from XI.
Can I Use the Same BAPI
BAPI_MTRREADDOC_UPLOAD
to Update the below fields,
EABL-SERNR
EABL-ZWNUMMER
EABLG-ABLESGR
EABL-V_ZWSTAND
EABL-N_ZWSTAND
EABL-ABLHINW
EABL-ZSKIPC
EABL-ADAT
EABL-ATIMTATS
EABL-ADATTATS
EABL-ATIM
EABL-ZMESSAGE
EABL-ABLESER(Meter reader number)
Kindly Suggest me,
Thanks in Advance,
GaneshHello Ganesh
I think you are going completely astray with you z-function module for IDoc processing.
If you look at TABLES parameter METERREADINGRESULTS (type BAPIEABLU ) of BAPI_MTRREADDOC_UPLOAD you will find many of the requested fields already:
EABL-SERNR => BAPIEABLU-SERIALNO
EABL-ZWNUMMER =>REGISTER
EABLG-ABLESGR
EABL-V_ZWSTAND
EABL-N_ZWSTAND
EABL-ABLHINW
EABL-ZSKIPC
EABL-ADAT
EABL-ATIMTATS => ACTUALMRTIME
EABL-ADATTATS => ACTUALMRDATE
EABL-ATIM
EABL-ZMESSAGE
EABL-ABLESER(Meter reader number)
Field EABL-ZMESSAGE appears to be custom field (at least I cannot find it on ECC 6.0). If this field was added using include CI_EABL then you probably can get these values into the BAPI using the EXTENSIONIN parameter.
Check routine CHECK_UPLOADRECORDS in the BAPI which allows two extension structures:
- BAPI_TE_EABL
- BAPI_TE_EOSB
Not surprisingly BAPI_TE_EABL contains the include CI_EABL.
Regards
Uwe -
Update Contract Schedule lines using BAPI_CUSTOMERCONTRACT_CHANGE
Dear All,
I want to change the schedule line of a Sales Contract using the BAPI, BAPI_CUSTOMERCONTRACT_CHANGE however i do not find any table parameter to do the same as is available in the Quotation & Sales Order change BAPIs.. I checked OSS but did not find any note in this regard.. Kindly let me know if there is any way this can be done apart from using the EXTENSIONIN parameter for this BAPI.
Thanks for your help.
Cheers
NiteshDear Dipak,
Is it possible to update the schedule lines without using the EXTENSIONIN parameter for this BAPI ?? If so kindly let me know.
Cheers
Nitesh -
Populating Customized fields in Sales Order Creation using BAPI
Hi All,
I have a requirement that, I need to populate 2 customized fields which are appedned in the VBAK tables through Append structure. I am using BAPI_SALESORDER_CREATEFROMDAT2 FM for creating it.
Could anybody tell me how to send these 2 coustomized field values in this BAPI using EXTERNIN parameter.
Regards
Rajesh
[email protected]Hi,
To add data to custom fields there are two appraoches.
<b>1)</b>Using the <b>EXTENSIONIN</b> in the Tables option in the FM <b>BAPI_SALESORDER_CREATEFROMDAT2</b>
Check the Documentation for the same,
<b>Customer Enhancement for VBAK, VBAP, VBEP</b>
<i>Description</i>
You can use this parameter to transfer user-specific enhancments to a BAPI. The customer has to complete the EXTENSION structure and the system automatically continues processing it. If you have not defined any user-specific fields, then you can transfer a blank EXTENSIONIN structure.
<b>Technical information about Customer Enhancements</b>
The following description uses an example to explain how to proceed with customer enhancements to the SD tables VBAK, VBKD, VBAP and VBEP.
The customer has added their own fields to table VBAP using the INCLUDE structure CUTEST. This structure contains 2 fields:
CFIELD1, CHAR 10
CFIELD2, CHAR 3.
The customer also requires that these two fields can be maintained with the BAPI.
1. Maintain structure CUTEST in table VBAP
2. Because the BAPIs work with checkboxes, you must also define a CUTESTX checkbox for the customer structure. It should be structured like this:
Field name Data element
CFIELD1 CHAR1
CFIELD2 CHAR1
3. Define these customer structures in the structures VBAPKOZ und VBAPKOZX using INCLUDE or APPEND.
4. Add the customer structures to the BAPE_VBAP and BAPE_VBAPX BAPI structures using the APPEND technique.
5. Adjust the following structures for customer enhancements to table VBAK:
a) VBAKKOZ
b) VBAKKOZX
c) BAPE_VBAK
d) BAPE_VBAKX
6. Adjust the following structures for customer enhancements to table VBEK:
a) VBEPKOZ
b) VBEPKOZX
c) BAPE_VBEP
d) BAPE_VBEPX
7. Generally, the data should be added to the BAPI interface in the internal communication structures (VBAKKOM, and so on). There, you can process the data in the SD tables (VBAK, and so on).
8. If the EXTENSIONIN parameter contains customer data, you must complete at least the key fields in the relevant standard parameters.
<i>For example:</i>
You want to change customer field VBAP-CFIELD2 for item 20 to "XYZ" in order 4711.
The following entries are expected:
Import: BAPIVBELN-VBELN = '0000004711' Document number
BAPISDHD1X-UPDATEFLAG = 'U' UPDKZ for doc header
Tables: BAPISDITM-ITM_NUMBER = '000020' Item number
BAPISDITMX-ITM_NUMBER = '000020' Item number
+ BAPISDITMX-UPDATEFLAG = 'U' UPDKZ for item
You must complete the EXTENSION table as follows:
STRUCTURE VALUEPART1 1234561234567890123
BAPE_VBAP 0000004711000020 XYZ
BAPE_VBAPX 0000004711000020 X
<b>Further Information</b>
You can find more information in the BAPI programming guide in the chapter for enhancements to BAPIs.
Notes
You must complete the STRUCTURE field with the name of the relevant enhancement structure (BAPE_VBAK, BAPE_VBAP, BAPE_VBEP). You can complete the remaining fields with the append structures from the enhancement structures.
At the moment, you can use the BAPI to store enhancements in the following structures:
VBAK : An enhancement to header data requires an append structure to BAPE_VBAK and an enhancement to structure VBAKKOZ.
VBAP : An enhancement to item data requires an append structure to BAPE_VBAP and an enhancment to structure VBAPKOZ.
VBEP : An enhancement to schedule line data requires an append structure to BAPE_VBEP and an enhancement to structure VBEPKOZ.
VBKD : If you are using an enhancement for header data, you must add an append structure to BAPE_VBAK. You also need to enhance structure VBAKKOZ. If it is for item data, you need to add an append structure to BAPE_VBAP. You must also enhance structure VBAPKOZ.
If you also want to work with checkboxes, each X-structure must also contain an append structure.
For example:
A customer has created an order and wants to include the material long text (50 digits long).
The EXTENSIONIN structure must be completed with BAPE_VBAP. Two fields have fixed definitions in this structure. These are in the VBAP host key (VBELN, POSNR). The customer sets up an append structure that contains field ZMAT50.
Because the VBELN is normally blank when you create an order, the data can look like this:
STRUCTURE |BAPE_VBAP
<b>2)</b> Create the Sales Document using the FM and when successfully craeted you will get the Sales Document No in the Export parameter <b>SALESDOCUMENT</b>.
After its created and Committed using <b>BAPI_TRANSACTION_COMMIT</b> , do a <b>BDC</b> recording for the same to (<b>VA02</b> Change Sales Order) update the fields only and save the document.
Regards,
AS -
BAPI for Sales Order Creation.
Hello gurus,
I want to create a sales order using BAPI.
I have tried some BAPI's like BAPI_SALESORDER_CREATEFROMDAT1, BAPI_SALESORDER_CREATEFROMDAT2, BAPI_SALESORDER_CREATEFROMDATA, BAPI_SALESDOCU_CREATEWITHDIA.
But I am not able to update the Miscellaneous Information like Mode of transport(VBAP-OIC_MOT), Forwarding Agent(VBAP-OIC_LIFNR), Base Location(VBAP-OIA_BASELO), Truck Number(VBAP-OIC_TRUCKN), Pipeline trip No.(VBAP-OIC_PTRIP), Pipeline operator´s external batch number(VBAP-OIC_PBATCH).
Is there any other BAPI thru which i can update these fields while creation of Sales Order.
The Fields which I can provide to BAPI as import parameter is:
Order Type(VBAK-AUART),
Contract(VBAK_VGBEL),
SALES Org (VBAK-VGORT),
Dist Channel(VBAK-VTWEG),
Division (VBAK-SPART),
Open Quantity (VBAK-KWMENG)
Plant(VBAP-WERKS)
Storage Location (VBAP-LGORT)
Mode of transport(VBAP-OIC_MOT), Forwarding Agent(VBAP-OIC_LIFNR), Base Location(VBAP-OIA_BASELO), Truck Number(VBAP-OIC_TRUCKN), Pipeline trip No.(VBAP-OIC_PTRIP), Pipeline operator´s external batch number(VBAP-OIC_PBATCH).
Thanks In Advance,
Points will be rewarded for Best Solution......
Yogesh Sharmahi,
I can give u a suggestion .. try it ..
its a quite a long process....
in BAPI_SALESORDER_CREATEFROMDAT2
there is a table EXTENSIONIN...
here u can add append structure and carry on ur sales order creation
Follow the process
Customer Enhancement for VBAK, VBAP, VBEP
Description
You can use this parameter to transfer user-specific enhancments to a BAPI. The customer has to complete the EXTENSION structure and the system automatically continues processing it. If you have not defined any user-specific fields, then you can transfer a blank EXTENSIONIN structure.
Technical information about Customer Enhancements
The following description uses an example to explain how to proceed with customer enhancements to the SD tables VBAK, VBKD, VBAP and VBEP.
The customer has added their own fields to table VBAP using the INCLUDE structure CUTEST. This structure contains 2 fields:
CFIELD1, CHAR 10
CFIELD2, CHAR 3.
The customer also requires that these two fields can be maintained with the BAPI.
1. Maintain structure CUTEST in table VBAP
2. Because the BAPIs work with checkboxes, you must also define a CUTESTX checkbox for the customer structure. It should be structured like this:
Field name Data element
CFIELD1 CHAR1
CFIELD2 CHAR1
3. Define these customer structures in the structures VBAPKOZ und VBAPKOZX using INCLUDE or APPEND.
4. Add the customer structures to the BAPE_VBAP and BAPE_VBAPX BAPI structures using the APPEND technique.
5. Adjust the following structures for customer enhancements to table VBAK:
a) VBAKKOZ
b) VBAKKOZX
c) BAPE_VBAK
d) BAPE_VBAKX
6. Adjust the following structures for customer enhancements to table VBEK:
a) VBEPKOZ
b) VBEPKOZX
c) BAPE_VBEP
d) BAPE_VBEPX
7. Generally, the data should be added to the BAPI interface in the internal communication structures (VBAKKOM, and so on). There, you can process the data in the SD tables (VBAK, and so on).
8. If the EXTENSIONIN parameter contains customer data, you must complete at least the key fields in the relevant standard parameters.
For example:
You want to change customer field VBAP-CFIELD2 for item 20 to "XYZ" in order 4711.
The following entries are expected:
Import: BAPIVBELN-VBELN = '0000004711' Document number
BAPISDHD1X-UPDATEFLAG = 'U' UPDKZ for doc header
Tables: BAPISDITM-ITM_NUMBER = '000020' Item number
BAPISDITMX-ITM_NUMBER = '000020' Item number
+ BAPISDITMX-UPDATEFLAG = 'U' UPDKZ for item
You must complete the EXTENSION table as follows:
STRUCTURE VALUEPART1 1234561234567890123
BAPE_VBAP 0000004711000020 XYZ
BAPE_VBAPX 0000004711000020 X
Further Information
You can find more information in the BAPI programming guide in the chapter for enhancements to BAPIs.
Notes
You must complete the STRUCTURE field with the name of the relevant enhancement structure (BAPE_VBAK, BAPE_VBAP, BAPE_VBEP). You can complete the remaining fields with the append structures from the enhancement structures.
At the moment, you can use the BAPI to store enhancements in the following structures:
VBAK : An enhancement to header data requires an append structure to BAPE_VBAK and an enhancement to structure VBAKKOZ.
VBAP : An enhancement to item data requires an append structure to BAPE_VBAP and an enhancment to structure VBAPKOZ.
VBEP : An enhancement to schedule line data requires an append structure to BAPE_VBEP and an enhancement to structure VBEPKOZ.
VBKD : If you are using an enhancement for header data, you must add an append structure to BAPE_VBAK. You also need to enhance structure VBAKKOZ. If it is for item data, you need to add an append structure to BAPE_VBAP. You must also enhance structure VBAPKOZ.
If you also want to work with checkboxes, each X-structure must also contain an append structure.
For example:
A customer has created an order and wants to include the material long text (50 digits long).
The EXTENSIONIN structure must be completed with BAPE_VBAP. Two fields have fixed definitions in this structure. These are in the VBAP host key (VBELN, POSNR). The customer sets up an append structure that contains field ZMAT50.
Because the VBELN is normally blank when you create an order, the data can look like this:
STRUCTURE |BAPE_VBAP
VALUEPART1 | 000010Customermateriallongtext50
VBELN POSNR ZMAT50 -
MIRO invoice creation with the Personnel Number in account assignment
I am using BAPI_INCOMINGINVOICE_CREATE for creating an Invoice using MIRO transaction.
In MIRO transaction-> PO reference-> Multiple account assignment-> we have the personnel number: In BAPI table-parameter ACCOUNTINGDATA and ITEMDATA is used to populate the account assignmet data but this structure doesn't have the Personnel Number field (PERSON_NO).
How can i create an Invoice with the Personnel Number in Account assignment, Is there any Userexit or BADI is available ?
Thanks,
Fract
Edited by: fract_get on May 23, 2011 6:49 PMYou can use EXTENSIONIN parameter from tables. There are BADI's related to this but don't know the name of badi. Please search forum for or use transaction code SE84 to search the BADI's/
you can check the badi: INVOICE_UPDATE and method 'before_save or something similar to map to db table fields.
See this thread to understand how extension parameters works.
bapi_salesorder_simulate extension bape_vbap standard field
Edited by: Sampath Kumar on May 23, 2011 11:28 AM -
PO doesn't get created, backend returns PO number with "S" message
Hi experts,
I need your kind assisstance with the following problem: when SC is sent to the backend, the backend system returns the PO number with a message that the PO has been created. When we check at the backend the PO is not created.... It happens only when customer fields are transfered in the table EXTENSIONIN.
SRM Server 500.
Thanks a lot for your help.
Tomas KrausHi
<u>What error are you getting in this case ?</u>
<b>Question:</b>
<u>You are using BAPI_PO_CREATE1 and BAPI_PO_CHANGE to supply user-defined fields for tables EKKO, EKPO and EKKN. During the update, a termination occurs with DBIF_RSQL_INVALID_REQUEST.</u>
Answer:
Check in the CI structures of the corresponding database table as to whether there are type P (packed) fields. Refer to the online documentation for user-defined fields and the ExtensionIn parameter:
In BAPI table extensions, only CHAR data type fields and similar data types can be used by the customer. This restriction arises as a result of the BAPIPAREX reference structure of the extension parameters. In addition, the customer must not use standard table fields in the APPEND of the BAPI table extension because a 'move-corresponding' would also overwrite the SAP field.
See Note 509898 for a solution approach.
<b>Please go through the SAP OSS note -</b>Note 582221 - FAQ: BAPIs for purchase orders
<b>for more details.</b>
<u>Also go through the related SAP OSS Notes -></u>
Note 390742 - Customer enhancements not transferred
Note 336589 - BAPI_PO_CREATE: Customer enhancements
Note 867018 - Customer fields transfer to the back end
Note 445169 - BAPI_PO_GET_DETAIL: Integrated customer enhancements
Note 395311 - BAPI_PO_CREATE: Customer enhancements not copied
Note 631758 BAPI_PO_GETDETAIL: Incorrect ExtensionOut struc. name
Hope this will definitely help.Do let me know.
Regards
- Atul -
Reg:BAPI_INQUIRY_CREATEFROMDATA2
Hi,
Which is the field name for UNIT_PRICE in the
bapi BAPI_INQUIRY_CREATEFROMDATA2.
Its urgent.
Regards,
CharuHi Jonathan,
I don't find price time in my system? Are you perhaps on an IS solution? IS Oil perhaps?
Anyway, the way you can send extra data to this BAPI using the EXTENSIONIN parameter.
First, find the dictionary table which holds the field you want to send (I would guess VBKD). Then, add the field you want to send (using an append structure in transaction SE11) to the structure bape_<table_name> (for example bape_vbkd).
Then, when you call the BAPI, add a row to the EXTENSIONIN parameter as follows:
1. For the STRUCTURE field, just fill in with the text BAPE_<table_name> (for example BAPE_VBKD).
2. For the VALUEPART1 field, you need to move the contents of the structure bape_<table_name>. So first, load up the structure with data (for example 0000000000000000101501 for inquiry 0000000000 and item 000000 and price time 10:15 and 1 second using structure bape_vbkd), and then transfer it to VALUEPART1.
The code within the BAPI will transfer the data from this extension to the appropriate ABAP table (note the field names in the actual table and the bape_<table_name> structure need to match).
Hope that helps.
Cheers,
Brad -
Extending Batch Input or Direct Input
Hello experts,
I am customizing Material Master by adding some custom fields to MARA. I know I can extend the IDoc for loading the data including my custom fields. I was wondering if, and how, to extend the Batch Input or Direct Input to include my custom fields.
Can anyone point me in the correct direction?Append the MARA structure with your custom fields. (Are these fields available on material master screen as well ?)
Write the code in the appropriate user-exit to populate these fields OR use a BAPI and extensionin parameter to populate your custom fields. -
Hi All,
How can i handle the Quantity field using BAPIPAREX?
EX.
I have added the following custom fields to the standard table EKKO.
zf_base (Price per ton, CURRENCY)
zreq_tons (Tons Required,QUANTITY)
zpo_issue_date (PO Issue date,Date)
Here I am using the bapi 'BAPI_PO_CREATE1' to create Purchase Order. How can i pass the above fields to BAPI.U dont have to create a Z verion. u can use extensionIN parameter. take a look at the bapi funtion module documentation. here is the hint,
<b>Customer's Own Fields (Import Parameters)</b>
This table allows you to add to the import parameters of the BAPI without modifying it.
The customer enhancement SAPL2012 allows you to add to or modify the PurchaseOrder.Change and PurchaseOrder.CreateFromData1BAPIs by:
Adapting existing SAP database tables
o Adding customer-specific fields to SAP tables
o Including existing database fields
Including additional customer-specific database tables
The following BAPI Table Extensions are available:
BAPI_TE_MEPOHEADER
BAPI_TE_MEPOHEADERX
BAPI_TE_MEPOITEM
BAPI_TE_MEPOITEMX
BAPI_TE_MEPOACCOUNTING
BAPI_TE_MEPOACCOUNTINGX
Maybe you are looking for
-
Hi, We are configuring the Team Foundation Server web part to show dashboards associated with burndown, user stories, etc. I added some active but when I click on the Bug Progress link, the chart does not display any data. I click on the Burndown lin
-
Because of a POLL() Timeout, Listener Connection to a DB Takes Long Time!
Envionment: OS: OEL5.3 (2.6.18-128.el5Xen) x86-64bit RDBMS: 11.1.0.7 (in an OVM setup) The Problem: It takes more than 10 seconds to get connected to the 11.1.0.7 database using SQL*Net with dedicated servers. Points to consider: 0. I posted this in
-
My macbook air won't play sound
my macbook air wont play any sound audio at all
-
Why to implement e-commerce gateway?
Hi All, We are in process of finalization of whether we should Tibco route or e-commerce route for the inbound and outbound transations. My understanding of E-Commerce Gateway is :- It takes the flat file provide by EDI translator(X12 format) and pus
-
Desktop & Screen Saver pane won't open in System Preferences
Whenever I go to open the Desktop & Screen Saver pane in System Preferences, it won't work and I get the message "Preferences Error: Could not load Desktop & Screen Saver preference pane." Please help. Thank you very much.