Problem in posting Custom fields in Purchase Order using BAPI_PO_CREATE1
Hi friends,
Did any body tried populating custom fields using BAPI_PO_CREATE1?
I am trying to populate custom fields in Header.
I am populating EXTENSIONIN-STRUCTURE with 'BAPI_TE_MEPOHEADER' and EXTENSIONIN-VALUEPART1 with respective values of fields using the code below.
T_CUSTDATA_IN-PROJECT_ID_NUM = '543211'.
T_CUSTDATA_INX-PROJECT_ID_NUM = 'X'.
MOVE 'BAPI_TE_MEPOHEADER' TO T_EXTENSIONIN-STRUCTURE.
*CLEAR T_BAPI_TE_PO_HEADER-PO_NUMBER.
MOVE-CORRESPONDING T_CUSTDATA_IN TO T_BAPI_TE_MEPOHEADER.
MOVE 'T_BAPI_TE_MEPOHEADER' TO T_EXTENSIONIN-VALUEPART1.
APPEND T_EXTENSIONIN.
MOVE 'BAPI_TE_MEPOHEADERX' TO T_EXTENSIONIN-STRUCTURE.
*CLEAR T_BAPI_TE_PO_HEADER-PO_NUMBER.
MOVE-CORRESPONDING T_CUSTDATA_INX TO T_BAPI_TE_MEPOHEADERX.
MOVE 'T_BAPI_TE_MEPOHEADERX' TO T_EXTENSIONIN-VALUEPART1.
APPEND T_EXTENSIONIN.
But still it is not populating the custom fields.
Can some body help me on this?
Thanks & Regards,
Ramesh Kodavati
Hi,
You require to implement the Badi ME_BAPI_PO_CUST
Method MAP2I_EXTENSIONIN or INBOUND
for changing the parameter CH_EXTENSIONIN in method INBOUND
or CH_STRUC in method MAP2I_EXTENSIONIN.
in addition to passing the extensionin parameters in bapi.
implement the above said bapi and put a break point in both of the methods (exactly i don't remember)
and check values are populating in the CH_STRUC structure.
Regards,
Dwaraka.S
Similar Messages
-
Customer Field in purchase order (ECC 6.0)
Hi,
I need a help on custumer field in ECC 6.0.
I would like to know if there is a standard way to see customer fields in purchase or sales order.
Thanks very much.
DiegoCustomer fields (as in KUNNR) or custom fields?
Bothe sales orders and POs have user-exit screens that can be employed to show <b>custom </b>fields both at header and item levels. In the case of sales orders, it is oft-referred to as "Additional Data B" screen. This is the last tab screen of the sales order.
Caveat: The above is from 46C, but am willing to bet that this feature still exists in the ECCs. -
Custom fields on Purchase order screen in SRM are missing.
Hi ALL,
SRM 5.0 R/3 4.6c
We have custom fields which appear on the create PO in SRM, the criteria for these fields to appear is if the item is of service type.So if its service item there will be additional/ custom fields for input purchase order screen in SRM,
But at this these fields dont show up for service item PO's . this is happening in Q and P environments while it is working fine in D and S. No changes were made to the system.
Also if I look in to bbp_pd info for the previous service PO, the data shows up in bbp_pd but the data or the custom fields are missing on the web.
We tried deactivating/activating the custom class in Q , but that did not help us!
Consider this as urgernt!
Can anyone please throw some light on this!
Thanks
KrishnaHave you implementated the BADI: BBP_CUF_BADI_2
if yes, then keep a break point there and see if you are missing any thing there... -
How to transfer Supplier custom field into Purchase order
Hi ,
We had a custom field called Project code in Supplier data (vendor master) at SRM. As per flow purchase order gets created as a follow-on document. Now the requirement -Project code which was there in supplier data this should be transfered to PO
In my knowledge this can be done through BADI , Could you please explain me steps required to do this?
Thanks in advance.
HarishTry BBP_DOC_CHANGE_BADI or BBP_ITEM_CHANGE_BADI.
-
ME59n exit/BADI to copy purchase requisition custom field to purchase order
I have added a custom field (Unloading Point) in the Purchase requisition customer screen. Now When a purchase order is created from the purchase requisition through t-code ME59N, I need to copy the unloading point value from the PR to Unloading Point in the shipping tab of the Purchase Order. Whch User-exit/BADI can be used for this purpose. <removed by moderator>
Edited by: Thomas Zloch on Nov 23, 2010 12:44 PM - please do not offer ...Good you found out what was the answer. Please share your solution, that sort of the idea of a forum like this.........
-
Add customer fields to purchase order header
Hi ,
I need to add two additional fields to the purchase order header.
In std program SAPMM06E screen number 101 i have seen a code
CALL CUSTOMER-SUBSCREEN CUSTSCR1 INCLUDING 'SAPLXM06' '0101'
how to make use of this..and add my fields..wht all steps need to be done for this..
do i hve to append fields to ekko..pls give me details
ansariYou have to use [Enhancement|http://help.sap.com/erp2005_ehp_04/helpdata/EN/bf/ec079f5db911d295ae0000e82de14a/frameset.htm] MM06E005, read the enhancement documentation for more information.
- Look at enhancement via transaction [SMOD|https://www.sdn.sap.com/irj/scn/advancedsearch?query=smod&cat=sdn_all]
- Implement via transaction [CMOD|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=cmod&adv=false&sortby=cm_rnd_rankvalue]
Look at [Enhancements|http://help.sap.com/erp2005_ehp_04/helpdata/EN/bf/ec079f5db911d295ae0000e82de14a/frameset.htm] and [Customer Exits|http://help.sap.com/erp2005_ehp_04/helpdata/EN/c8/1975cc43b111d1896f0000e8322d00/frameset.htm] or the old [Changing the SAP Standard (BC)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCDWBCEX/BCDWBCEX.pdf]
Another source of information begins at OSS [Note 496083 - FAQ: Customer enhancements (User Exits) in purchasing|https://service.sap.com/sap/support/notes/496083]
Regards -
Custom field in Purchase Order header tab
Hi,
I have created a custom input field for ME22N transaction using the Program SAPLXM06 and screen number 0101.
The screen is getting visible in PO transaction and user can enter the value in it.
But it is not getting updated in the database table inspite of passing the screen field value to ekko-zzfield.
Moreover, i have defined screen field as ekko_ci-zzfield, as this field has been added in the EKKO table.
What could be the reason???
Regards
PavanHi,
You need to use the user exits
EXIT_SAPMM06E_006 - Export Data to Customer Subscreen for Purchasing Document Header (PBO)
EXIT_SAPMM06E_007 - Export Data to Customer Subscreen for Purchasing Document Header (PAI)
Thanks,
Shailaja Ainala. -
Purchase Orders Using BAPI_PO_CREATE1
Hi guys ,
when v want to upload PO data using BAPI FM
wat r the Strutures to be passed
Is it necessary 2 pass Xstructures
if So? why ? can any one have sample Code
Regards
Anil kumar*& Report ZP_TEST_POBAPI
REPORT zp_test_pobapi.
*- BAPI related declarations
DATA : g_pohdr TYPE bapimepoheader,
g_pohdrx TYPE bapimepoheaderx,
gt_poitem TYPE TABLE OF bapimepoitem,
gt_poitemx TYPE TABLE OF bapimepoitemx,
gt_posched TYPE TABLE OF bapimeposchedule,
gt_poschedx TYPE TABLE OF bapimeposchedulx,
gt_poacct TYPE TABLE OF bapimepoaccount,
lt_poacct TYPE bapimepoaccount,
gt_poacctx TYPE TABLE OF bapimepoaccountx,
lt_poacctx TYPE bapimepoaccountx,
gt_poservice TYPE TABLE OF bapiesllc,
gt_posrvacc TYPE TABLE OF bapiesklc,
gt_return TYPE TABLE OF bapiret2,
centro like bapimepoaccount-costcenter VALUE '1000',
cuenta like bapimepoaccount-gl_account VALUE '112655' ,
num_pos like bapimepoaccount-po_item VALUE '10' ,
serial like bapimepoaccount-serial_no VALUE '01' ,
ind_imp like bapimepoaccount-tax_code VALUE 'I2' ..
PERFORM prepare_header.
PERFORM prepare_items.
PERFORM prepare_schedule.
lt_poacct-po_item = '0010'.
lt_poacct-serial_no = serial .
lt_poacct-creat_date = sy-datum .
lt_poacct-costcenter = centro .
lt_poacct-gl_account = cuenta .
lt_poacct-gr_rcpt = 'tester'.
APPEND lt_poacct to gt_poacct.
append gt_poacct. clear gt_poacct.
*POPULATE gt_poacct FLAG TABLE.
lt_poacctx-po_item = '0010' .
lt_poacctx-po_itemx = 'X' .
lt_poacctx-serial_no = serial .
lt_poacctx-serial_nox = 'X' .
lt_poacctx-creat_date = 'X' .
lt_poacctx-costcenter = 'X' .
lt_poacctx-gl_account = 'X' .
lt_poacct-gr_rcpt = 'X'.
append lt_poacctx to gt_poacctx.
PERFORM create_po.
*& Form prepare_header
Set up header structure
FORM prepare_header.
g_pohdr-comp_code = '1000'.
g_pohdrx-comp_code = 'X'.
set up doc type
g_pohdr-doc_type = 'NB'.
g_pohdrx-doc_type = 'X'.
g_pohdr-vendor = '0000010123'.
g_pohdrx-vendor = 'X'.
g_pohdr-langu = sy-langu.
g_pohdrx-langu = 'X'.
g_pohdr-purch_org = 'BA01'.
g_pohdr-purch_org = '1000'.
g_pohdrx-purch_org = 'X'.
g_pohdr-pur_group = '001'.
g_pohdrx-pur_group = 'X'.
g_pohdr-currency = 'EUR'.
g_pohdrx-currency = 'X'.
ENDFORM. " prepare_header
*& Form prepare_items
Set up item values
FORM prepare_items.
DATA : ls_poitem TYPE bapimepoitem,
ls_poitemx TYPE bapimepoitemx.
ls_poitem-po_item = '00010'.
ls_poitemx-po_item = '00010'.
ls_poitemx-po_itemx = 'X'.
ls_poitem-material = 'PARAG03'.
ls_poitemx-material = 'X'.
ls_poitem-short_text = 'PAR'.
ls_poitemx-short_text = 'X'.
ls_poitem-vend_mat = 'xyz'.
ls_poitemx-vend_mat = 'X'.
ls_poitem-quantity = '100'.
ls_poitemx-quantity = 'X'.
ls_poitem-po_unit = 'EA'.
ls_poitemx-po_unit = 'X'.
ls_poitem-po_unit_iso = 'EA'.
ls_poitemx-po_unit_iso = 'X'.
ls_poitem-net_price = '6'.
ls_poitemx-net_price = 'X'.
ls_poitem-price_unit = '1'.
ls_poitemx-price_unit = 'X'.
ls_poitem-item_cat = 'D'.
ls_poitemx-item_cat = 'X'.
ls_poitem-plant = '1000'.
ls_poitemx-plant = 'X'.
ls_poitem-acctasscat = 'K'.
ls_poitemx-acctasscat = 'X'.
ls_poitem-acctasscat = <fs_req>-knttp.
ls_poitemx-acctasscat = 'X'.
ls_poitem-distrib = <fs_req>-vrtkz.
ls_poitemx-distrib = 'X'.
ls_poitem-part_inv = <fs_req>-twrkz.
ls_poitemx-part_inv = 'X'.
ls_poitem-gr_ind = <fs_req>-wepos.
ls_poitemx-gr_ind = 'X'.
ls_poitem-gr_non_val = <fs_req>-weunb.
ls_poitemx-gr_non_val = 'X'.
ls_poitem-ir_ind = <fs_req>-repos.
ls_poitemx-ir_ind = 'X'.
ls_poitem-agreement = <fs_req>-konnr.
ls_poitemx-agreement = 'X'.
ls_poitem-agmt_item = <fs_req>-ktpnr.
ls_poitemx-agmt_item = 'X'.
ls_poitem-preq_no = <fs_req>-banfn.
ls_poitemx-preq_no = 'X'.
ls_poitem-preq_item = <fs_req>-bnfpo.
ls_poitemx-preq_item = 'X'.
ls_poitem-preq_name = <fs_req>-afnam.
ls_poitemx-preq_name = 'X'.
ls_poitem-pckg_no = <fs_req>-packno.
ls_poitemx-pckg_no = 'X'.
APPEND : ls_poitem TO gt_poitem,
ls_poitemx TO gt_poitemx.
ENDFORM. " prepare_items
*& Form prepare_schedule
Schedule data
FORM prepare_schedule.
DATA : ls_posched TYPE bapimeposchedule,
ls_poschedx TYPE bapimeposchedulx.
ls_poschedx-po_item = '00010'.
ls_posched-po_item = '00010'.
ls_poschedx-po_itemx = 'X'.
ls_posched-delivery_date = '10.10.2007'.
ls_poschedx-delivery_date = 'X'.
ls_posched-quantity = '100'.
ls_poschedx-quantity = 'X'.
ls_posched-preq_no = <fs_req>-banfn.
ls_poschedx-preq_no = 'X'.
ls_posched-preq_item = <fs_req>-bnfpo.
ls_poschedx-preq_item = 'X'.
APPEND : ls_posched TO gt_posched,
ls_poschedx TO gt_poschedx.
ENDFORM. " prepare_schedule
*& Form create_po
Create PO with ref to the req
FORM create_po.
DATA : lt_return TYPE TABLE OF bapiret2,
l_ponum TYPE banfn.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = g_pohdr
poheaderx = g_pohdrx
testrun = 'X'
IMPORTING
exppurchaseorder = l_ponum
TABLES
return = lt_return
poitem = gt_poitem
poitemx = gt_poitemx
poschedule = gt_posched
poschedulex = gt_poschedx
poaccount = gt_poacct
poaccountx = gt_poacctx
poservices = gt_poservice
posrvaccessvalues = gt_posrvacc.
APPEND LINES OF lt_return TO gt_return.
IF NOT l_ponum IS INITIAL.
MESSAGE s398(00) WITH 'Purchase document ' l_ponum
' successfully created'.
ENDIF.
ENDFORM. " create_po -
Probelm with Creating purchase order using BAPI_PO_CREATE1
Hi Experts,
I am trying to create a PO using the "BAPI_PO_CREATE1".
The BAPI is returning a PO number but when I am checking for the same in ME23 its saying that the number doesnot exsists.
In BAPI retrun I am gettig an info message as "Stock transport ord. Created number 4500016833". What does this indicate and what do I need do for the PO to get created?
Thanks & Regards,
SumaIf so how can we make use of the PO create BAPI from an Integration like XI?
I need to create a PO using BAPI from XI, and the returned PO number has to taken reference and create a Goods receipt using BAPI_GOODSMVT_CREATE. I am testing the data before using the same for XI.
So what do i need to do for creating a PO from XI?
Thanks,
Suma -
Customer field to purchase requisition
Hello,
I add the customer field at subscreen of purchase requisition ( at the data base table i add the relative field in ci_ebandb include ) by EXIT_SAPLMEREQ_001 and
EXIT_SAPLMEREQ_002 and EXIT_SAPLMEREQ_003.
I add the same customer field at subscreen of purchase order ( at the data base table i add the relative field in ci_ekpodb include ) by EXIT_SAPLMEREQ_016 and EXIT_SAPLMEREQ_017 and EXIT_SAPLMEREQ_018.
The problem is: when i convert the purchase requisition in purchase order, the data into customer field of
purchase requisition not are transfert in the customer field of purchase order.
thanks for help,
Roberto Baldassarre.correction **
tks for your help,
but i had just done it. I explain with detail my step:
I add the customer field at subscreen of purchase requisition by
EXIT_SAPLMEREQ_001 and EXIT_SAPLMEREQ_002 and EXIT_SAPLMEREQ_003 (at
the data base table I add the relative field on ci_ebandb include).
I add the same customer field at subscreen of purchase order by
EXIT_SAPMM06E_016 and EXIT_SAPMM06E_017 and EXIT_SAPMM06E_018 (at
the data base table i add the relative field on ci_ekpodb include).
Step followed:
1. add field at EBAN table by CI_EBANDB include
2. add same field at EKPO table by CI_EKPODB include.
3. write code at EXIT_SAPLMEREQ_001,EXIT_SAPLMEREQ_003 following
document's help.
4. write code at EXIT_SAPMM06E_016, EXIT_SAPMM06E_017 ,
EXIT_SAPMM06E_018 following document's help.
5. build dynpro 0111 on function group XM02
6. build dynpro 0111 on function group XM06
The problem is: when i convert the purchase requisition in purchase
order (ME59n), the data into customer fields of purchase requisition
not are copied in the customer fields of purchase order (this field are
empty).
Tks for your help! -
Problem in creating Purchase order Using BAPI
Dear ABAPers,
I am creating the Purchase order Using BAPI_PO_CREATE1. In that the Purchase order Line item i am giving the Net Price for the Material.But While creating the purchase order the system creates the puchase order with the net price which is already available in the memory.So how to solve this problem.
Thanks & Regards,
Ashok.Hi,
Try to pass the value NO_PRICE_FROM_PO in the BAPI and see
NO_PRICE_FROM_PO = 'X'
Regards
Bala Krishna -
Adding a custom tab in Purchase Order with two fields - ME21N
Hello Experts,
My requirement is to add a custom tab with two fields in purchase order at header level.
The BADI ME_PROCESS_PO_CUST is alreday implemented previously as there was one custom tab added previously in header.
The structure CI_EKKODB already have the custom fields for the enhancement done earlier.
Now to add my additional tab how should i proceed ....should i put my additional fields in the same structure and write my code in same BADI.....will there be any impact on already done enhanecement.
Please suggest in achieving this functionality.
Thanks,
NaveenHi,
Check this [wiki|http://wiki.sdn.sap.com/wiki/display/ABAP/DetailedexplanationaboutBADIandthewaystofindtheBADIwithanexample%28ME23n+transaction%29], it tells you how to do with an example for item data.
Regards,
Eduardo -
Make short text field in Purchase order creation only display..
Sir,
Yeah my requirement is quite unusual, but such is the situation.
I want to make the short text field in purchase order creation "only disply". what is happening is that user while creating PO is able to change the text of material in short text column. I want to make it only for display.
Can it done on document type level, since for service type, and Text type of account assignment cat, only text field is filled up. so how to do it.
Please assist...
RahulDear Rahul,
If you want to have the short text display only for standard item but not service item, you may check below customizing.
Transaction SPRO:
MM-PUR-PO
-> Define screen layout at document level
Field Selection group: Basic Data, Item
Field Selection Key: PT0F Standard item purchase order
Field: Short text -> set as display
Hope this help.
Ian Wong Loke Foong -
Addtion of new custom field in PP order
Hi All,
I am looking forward to add a new custom field in PP order and to link it with table AUFK in the existing tabs of PP order.
I dont want to use any existing field. Also I have only have an option of having a new custom tab with the new field altogether which I dont want to use.
Please help if possible how can I accomplish it.
Rg,
VipulHi Vipul,
Nobody works in all areas and nobody gives instant solutions to each problem. I told you in my first reply that we have done similar devlopment in material master..not in prod order and i clearly mentioned that possibilty is there.
Your Abaper might not be able to develop this because this is not easy and you also might not be able to give correct functional logic.
Regards
Tajuddin -
Implementation Of Badi ME_GUI_PO_CUST for adding fields in Purchase Order
Hi All
I am implementing BADI ME_GUI_PO_CUST / ME_PROCESS_PO_CUST to add additional fields in Purchase Order.
The implementation of the BADI ie the Subscreen of the fields to be added appears in transaction ME23N but it does not appear in the transaction ME22N and ME21N.
Can anyone help me on this.
Thanx.
Moderator message - Duplicate post locked
Edited by: Rob Burbank on Jul 10, 2009 12:10 PMcheck the answer
[New tabs added by Badi ME_GUI_PO_CUST not seen in ME21N and ME22N;
bye
Maybe you are looking for
-
Can things in the icloud be shared between apple id accounts?
I would like to add my iphone and my wifes iphone to icloud. If we each have our own apple id, will we be able to share our photos between accounts, or would it be better to have one apple id and place both of our devices under the one account? If
-
How to change the font style of user in webdynpro code
Hi Experts I have retrieved the user in webdynpro code through ume api . But the username is getting displayed in bold by default. Could you suggest me how to convert it to normal font so that the username is not displayed in bold. Regards Chandana
-
i m confused about logo size and format plz help me out...@
-
Hey. I've installed my brand new Vertex 4 SSD a couple of days ago, in my Macbook Pro 13" from late 2011... The problem is, that my battery time has dropped from normally being about 7 hours left at full charge, to 5 hours on full charge. I've tried
-
I bought a new computer and no longer have the old one with around 200 songs on it. When I downloaded iTunes to the new computer and purchased 10 songs, it asked if I'd like to replace my existing songs on my iPod with the new ones. I accidentally cl