Imposible to update Z-Fields appended to EBAN
Hi gurus
There are Z-fields added to the table EBAN (purchase requisition) and wish to modify the value of these fields through a BAPI (BAPI_PR_CHANGE)
I know that I have to do by filling out the parameters of the table EXTENSIONIN but I have done all the tests possible and couldn't
I call BAPI_PR_GETDETAIL to see how fills EXTENSIONOUT table and then i put the same parameters into EXTENSIONIN to call BAPI_PR_CHANGE and no results
These are the Z fields added to EBAN
PRIO_REQ <----- This is the last standard field of EBAN
.INCLUDE CI_EBANDB <---- Include where Z-fields are in
ZBUYER ZBUYER CHAR 12
ZNMBUY ZNMBUY CHAR 30
ZBUQUE CHAR 20
ZMOTOR CHAR 20
ZNPARTE CHAR 6
ZBUYER2 ZBUYER2 CHAR 12
ZBUYER3 ZBUYER3 CHAR 12
I see that the Z-fields are added on INCLUDE, not APPEND and i don't know if this is a problem, otherwise i hope someone can bring some ligth to this because is a big problem, i only can update these fields throug ME52N and can't make batch input to this transaction
Thanks
HI
Try to implement the Business addin ME_BAPI_PR_CUST
i.e., the method INBOUND.
and check the changing parameter CH_EXTENSIONIN
I think the badi will be triggered for the bapi BAPI_PR_CREATE, check if the same is useful for BAPI_PR_CHANGE as well.
<REMOVED BY MODERATOR>
With Regards,
Dwarakanath
Edited by: Alvaro Tejada Galindo on Mar 19, 2008 6:06 PM
Similar Messages
-
How to update some fields of EBAN in ABAP code
Hi, all
In my ABAP program, I have to update two fields of EBAN .
But I could not find any function or BAPI about it.
Would anyone out there be able to help.
Many thanks
AysenurHello,
Try with these FM.
Function group Function group short text
Name of function module Short text for function module
MEWF BAPIs for Release of Requisition/PO
BAPI_REQUISITION_RELEASE Release Purchase Requisition Item by Item
BAPI_REQUISITION_RELEASE_GEN Release Entire Purchase Requisition
BAPI_REQUISITION_RESET_RELEASE Cancel Release of Purchase Requisition Items
BAPI_REQUISITION_RESET_REL_GEN Cancel Overall Release of Purchase Requisitions
MEWQ BAPIs Requirement Coverage Request
BAPI_REQUISITION_CHANGE Change Purchase Requisition
BAPI_REQUISITION_CREATE Create Purchase Requisition
BAPI_REQUISITION_DELETE Delete/close purchase requisition
BAPI_REQUISITION_GETDETAIL Display Purchase Requisition Details
BAPI_REQUISITION_GETITEMS Read Purchase Requisition Item
BAPI_REQUISITION_GETITEMSREL List Purchase Requisitions Awaiting Release
BAPI_REQUISITION_GETRELINFO Display Detailed Release (Approval) Information on Purchase Requisitio
If useful reward points.
Vasanth -
Update Z field from BSIK into BSAK when closing
Hi,
I have created Z field in BSIK table using "Append structure" option. I also created identical field via same option in table BSAK. When I clear open item system "delete" that item in table BSIK and create identical item in table BSAK (BSIK - open items; BSAK-closed items), BSIK and BSAK have same structure because of this trensfer of open items from BSIK to BSAK during open item clearing. My problem - when open item is cleared and item is transferd from BSIK to BSAK my Z field is not updated by system. Is it possible to set this in customizing or is there another way to update this Z field in BSAK when someone clear open items - user exit, modification or ???.
Thanks in advance.
SasaHi Andreas,
than you for your responce.
I tried to find out suitable event for this in fibf but withouth success. Could you suggest event that will be suitable for this purpuse.
One more thing - if I reverse clearing (via transaction FBRA) system will transfer closed item from BSAK to BSIK and during that process Z field will not be updated so I also need event to update this field durind reverse clearing.
Thank you in advance.
Kind regards,
Sasa -
DYNP_VALUES_UPDATE not updating SCREEN FIELD PERNAM
Following code not working. screen field pernam not getting updated. pls advise.
tables:zmara ,DFIES.
PARAMETER: pmatnr LIKE zmara-matnr,
pernam like zmara-ernam.
AT SELECTION-SCREEN ON PMATNR.
perform p2.
FORM P2.
*****READ
DATA: SCREEN_VALUES TYPE TABLE OF DYNPREAD ,
SCREEN_VALUE LIKE LINE OF SCREEN_VALUES.
DATA: MATNR1 LIKE ZMARA-MATNR,
ERNAM1 LIKE ZMARA-ERNAM.
SCREEN_VALUE-FIELDNAME = 'PMATNR' . " Field to be read
APPEND SCREEN_VALUE TO SCREEN_VALUES. " Fill the table
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = SCREEN_VALUES.
read TABLE SCREEN_VALUES INDEX 1 INTO SCREEN_VALUE.
MATNR1 = SCREEN_VALUE-FIELDVALUE.
*OVERLAY MATNR1 WITH '000000000000000000'.
*SHIFT MATNR1 RIGHT DELETING TRAILING SPACE.
UNPACK MATNR1 TO MATNR1.
SELECT ERNAM FROM ZMARA INTO ERNAM1 WHERE MATNR = MATNR1.
ENDSELECT.
*message ERNAM1 TYPE 'I'.
**********UPDATE
CLEAR SCREEN_VALUES[].
CLEAR SCREEN_VALUE.
SCREEN_VALUE-FIELDNAME = 'PERNAM' . " Field to be read
SCREEN_VALUE-FIELDVALUE = ERNAM1.
APPEND SCREEN_VALUE TO SCREEN_VALUES. " Fill the table
CLEAR SCREEN_VALUE.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
DYNAME = sy-CPROG
DYNUMB = SY-DYNNR
TABLES
DYNPFIELDS = SCREEN_VALUES.
loop at screen_values into screen_value.
message SCREEN_VALUE-FIELDVALUE TYPE 'I'.
ENDLOOP.
ENDFORM.
Moderator Message: Put a little more effort from your end. Did you check in Debugger?
Edited by: kishan P on Mar 30, 2011 12:21 PMHi Manfred,
Replace all the DYNP_VALUES_UPDATE-related content by the following statement:
SET USER-COMMAND 'xxx'.
While DYNP_VALUES_UPDATE does update the fields, a roundtrip is not triggered so the content of the fields will not be refreshed. The SET USER-COMMAND does that.
Hope this helps you!
Cheers, Roel -
DYNP_VALUES_UPDATE not Updating the Field on my Dynpro
Hi.
I want to create a dynpro where two fields are. Field 1 allows the user to enter a customer number, field two shall come up with a number that is calculated somehow. The calculation can last up to 20 seconds, so I dont want to make the user waite for this number.. .he shall be able to work with the rest of the dynpro.
Therefore I called the function that does the calcuiation like that:
MODULE user_command_0100 INPUT.
DATA: lv_guid_16 TYPE guid_16.
IF kna1-kunnr IS NOT INITIAL AND kna1-kunnr <> gv_kunnr
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_16 = lv_guid_16.
gv_taskid = lv_guid_16+8(8).
CALL FUNCTION 'YDETERMINE_DEPOTDISTANCE'
STARTING NEW TASK gv_taskid
PERFORMING receive_depent ON END OF TASK
EXPORTING
i_kunnr = kna1-kunnr.
ENDIF.
ENDMODULE.
The next piece of code shall get the returning value if the function wants to return its results.
FORM receive_depent USING i_task TYPE clike.
TABLES: d020s.
DATA: dyname LIKE d020s-prog,
dynumb LIKE d020s-dnum.
DATA: BEGIN OF dynpfields OCCURS 1.
INCLUDE STRUCTURE dynpread.
DATA: END OF dynpfields.
IF i_task = gv_taskid.
RECEIVE RESULTS FROM FUNCTION 'YDETERMINE_DEPOTDISTANCE'
IMPORTING
e_depent = kna1-yydepent
e_accuracy = gv_accuracy.
MOVE 'KNA1-YYDEPENT' TO dynpfields-fieldname.
MOVE kna1-yydepent TO dynpfields-fieldvalue.
APPEND dynpfields.
dyname = sy-cprog.
dynumb = '0100'.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = dyname
dynumb = dynumb
TABLES
dynpfields = dynpfields
EXCEPTIONS
invalid_abapworkarea = 01
invalid_dynprofield = 02
invalid_dynproname = 03
invalid_dynpronummer = 04
invalid_request = 05
no_fielddescription = 06
undefind_error = 07.
ASSERT sy-subrc = 0.
ENDIF.
Problem is: The DYNP_VALUES_UPDATE does not update the field on my dynpro at all. If I hit enter another time, then the field is provided by the value as another PBO will be processed. What is my mistake here?
Regards
Manfred
Edited by: Rob Burbank on Oct 29, 2010 12:07 PMHi Manfred,
Replace all the DYNP_VALUES_UPDATE-related content by the following statement:
SET USER-COMMAND 'xxx'.
While DYNP_VALUES_UPDATE does update the fields, a roundtrip is not triggered so the content of the fields will not be refreshed. The SET USER-COMMAND does that.
Hope this helps you!
Cheers, Roel -
Need to update custom fields in MSEG table using "BAPI_GOODSMVT_CREATE"
Hi All,
There is a requirement to update custom fields in table MSEG which are part of append structure. There is a option to update the custom fields using the one of the tables parameters "EXTENSIONIN". Anyone please advice how can I update the custom field thru EXTENSIONIN.
Thanks in advance.
cheers,
Vijaysee the help
http://help.sap.com/saphelp_nw04/helpdata/en/c3/4099948b8911d396b70004ac96334b/frameset.htm
Regards
Kiran Sure -
Problem in Updating a field in corpNAB resource through workflows
Hi,
I am working in Sun Java system identity manager 7.1 version.
I have created one workflow which sends a list of Ids to a sub work flow,The sub workflow updates a field called user name in person document of corpNAB resource for each user.
Username consists set of values like fullname,certifier etc.
I am appendng each such values to a list and setting in the person document.
The order in which i am appending the values is not reflecting in the corpNAB person document field.
Please refer to the code and help me to solve.
Thanks in advance.
<append name='user.accounts[CorpNAB].FullName'>
<concat>
<ref>short_name</ref>
<s>/Corp/lexmark</s>
</concat>
<concat>
<ref>fullname</ref>
<s>/Corp/lexmark</s>
</concat>
<concat>
<ref>fullname</ref>
<ref>temp_cert</ref>
</concat>
<ref>short_name</ref>
<ref>fullname</ref>
</append>Hi..
Change ur Select statement as below .
<b>select knumv sum(kbetr)</b>
from konv
into table it_konv
for all entries in it_vbrk
where kschl = 'ZFQT'
and knumv = it_vbrk-knumv
<b>group by knumv .</b>
Here you need not to Retrieve the Field KSCHL since it is anyway given in the WHERE clause.
Let me know incase of any other issue.
<b>Reward if Helpful.</b> -
Update Z-Field in EKPO with BAPI_PO_CHANGE
Hello!
I need to update my field - called ZSERNR - in the table EKPO.
I found the FM BAPI_PO_CHANGE, but I do not know how it works.
I tried it so, but I just get the message (table RETURN), that no datas got changed.
I found some threads but I didn't understand them.
DATA: s_item TYPE bapimepoitem,
s_itemx TYPE bapimepoitemx,
i_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
i_extension TYPE bapiparex OCCURS 0 WITH HEADER LINE,
s_bapi_te_mepoitem TYPE bapi_te_mepoitem,
s_bapi_te_mepoitemx TYPE bapi_te_mepoitemx.
s_bapi_te_mepoitemx-po_item = ls_data_new-ebelp.
s_bapi_te_mepoitemx-zsernr = 'X'.
s_bapi_te_mepoitem-po_item = ls_data_new-ebelp.
s_bapi_te_mepoitem-zsernr = '123123'.
i_extension-structure = 'BAPI_TE_MEPOITEM'.
i_extension-valuepart1 = s_bapi_te_mepoitem.
APPEND i_extension.
i_extension-structure = 'BAPI_TE_MEPOITEMX'.
i_extension-valuepart1 = s_bapi_te_mepoitemx.
APPEND i_extension.
s_item-po_item = ls_data_new-ebeln.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = ls_data_new-ebeln
TABLES
return = i_return
extensionin = i_extension.
I hope somebody can help me.
ThxThank you for your fast answear
I didn't solved the problem till now, but I know that I can't use this FM in my BADI.
Because the table EKPO is locked at the time I am using the FM.
(BADI also writes into the table EKPO) -
HI,
I am trying to update the Subcontracting type of PO using 'BAPI_PO_CHANGE'. However i am able to update this field .
Can someone advice me how to do.
My code sample is :
wl_poitem-po_item = l_ebelp.
wl_poitemx-po_item = wl_poitem-po_item.
wl_poitemx-po_itemx = c_x.
*C--material procurement indicator need to update
* the type of procurement
wl_materialind-po_item = wl_poitem-po_item.
wl_materialindx-po_item = wl_poitem-po_item.
wl_materialindx-po_itemx = c_x.
wl_materialind-item_no = wl_poitem-po_item.
wl_materialindx-item_no = wl_poitem-po_item.
wl_materialindx-item_nox = c_x.
wl_materialind-mat_provision = 'S'.
wl_materialindx-mat_provision = c_x.
wl_materialind-sched_line = '0001'.
wl_materialindx-sched_line = '0001'.
wl_materialindx-sched_linex = c_x.
wl_materialind-entry_quantity = wl_poitem-quantity.
wl_materialindx-entry_quantity = c_x.
wl_materialind-plant = wl_poitem-plant.
wl_materialindx-plant = c_x.
wl_materialind-material = wl_poitem-material.
wl_materialindx-material = c_x.
wl_materialind-item_cat = 'L'.
wl_materialindx-item_cat = c_x.
wl_extensionin-structure = 'BAPI_TE_MEPOITEM'.
wl_extensioninx-structure = 'BAPI_TE_MEPOITEMX' .
wl_extensionin-valuepart1+222(1) = '1'.
wl_extensioninx-valuepart1+24(1) = c_x.
APPEND wl_poitem TO tl_poitem.
CLEAR wl_poitem.
APPEND wl_poitemx TO tl_poitemx.
CLEAR wl_poitemx.
APPEND wl_materialind TO tl_materialind.
CLEAR wl_materialind.
APPEND wl_materialindx TO tl_materialindx.
CLEAR wl_materialindx.
APPEND wl_extensionin TO tl_extensionin.
CLEAR wl_extensionin.
APPEND wl_extensioninx TO tl_extensioninx.
CLEAR wl_extensioninx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = l_ebeln
versions = wa_version
TABLES
return = tl_return
* poitem = tl_poitem
* poitemx = tl_poitemx
pocomponents = tl_materialind
pocomponentsx = tl_materialindx
extensionin = tl_extensionin
extensionout = tl_extensioninx.
READ TABLE tl_return WITH KEY type = 'E' TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
ENDIF.In the above question i mean- I am UNABLE to update
-
URGENT: Updating FISTL field using BAPI_PO_CHANGE
HI Friends,
I am about to update the field FISTL and GEBER in EKKN .
I am using BAPI_PO_CHANGE to update those fields . I have tried passing the fields to the table
POITEM and POACCOUNT in BAPI.
i have also given the values to POITEMX and POACCOUNTX tables .
I have given the BAPI_COMMIT_TRANSACTION also . i have given wait time also . Even then the value is not updated in EKKN table .
What could be reason for value not getting updated .
Is the table to which i am passing in BAPI is ok?
Please help me in this issue , its urgent.
Reward is sureHi Gokul,
Try 'BAPI_PO_CREATE1' and see if you can achieve the result.
*& Report YDM_PO_CREATE *
REPORT ydm_po_create.
*-- Input File Declaration
TYPES: BEGIN OF ty_input_file,
column1 TYPE char50,
column2 TYPE char50,
column3 TYPE char50,
column4 TYPE char50,
column5 TYPE char50,
column6 TYPE char50,
column7 TYPE char50,
column8 TYPE char50,
column9 TYPE char50,
column10 TYPE char50,
column11 TYPE char50,
column12 TYPE char50,
column13 TYPE char50,
column14 TYPE char50,
column15 TYPE char50,
column16 TYPE char50,
column17 TYPE char50,
column18 TYPE char50,
END OF ty_input_file.
DATA: i_input_file TYPE STANDARD TABLE OF ty_input_file,
wa_input_file TYPE ty_input_file.
CONSTANTS: c_path TYPE char20 VALUE 'C:\',
c_mask TYPE char9 VALUE ',*.*,*.*.',
c_mode TYPE char1 VALUE 'O',
c_filetype TYPE char10 VALUE 'ASC',
c_x TYPE char01 VALUE 'X'.
PARAMETERS : p_fname LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
*-- Browse Presentation Server
PERFORM f4_presentation_file.
START-OF-SELECTION..
*-- Read presentation server file
PERFORM f1003_upload_file.
IF NOT i_input_file[] IS INITIAL.
PERFORM split_data.
ENDIF.
*& Form f4_presentation_file
*& F4 Help for presentation server
FORM f4_presentation_file .
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = c_path
mask = c_mask
mode = c_mode
title = text-001
IMPORTING
filename = p_fname
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_presentation_file
*& Form f1003_upload_file
*& Upload File
FORM f1003_upload_file .
DATA: lcl_filename TYPE string.
lcl_filename = p_fname.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lcl_filename
filetype = c_filetype
has_field_separator = c_x
TABLES
data_tab = i_input_file
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
ENDFORM. " f1003_upload_file
*& Form split_data
Collect data for creating Purchase Order
FORM split_data .
DATA: i_poitem TYPE STANDARD TABLE OF bapimepoitem,
i_poitemx TYPE STANDARD TABLE OF bapimepoitemx,
i_poitem_sch TYPE STANDARD TABLE OF bapimeposchedule,
i_poitem_schx TYPE STANDARD TABLE OF bapimeposchedulx,
i_acct_*** TYPE STANDARD TABLE OF bapimepoaccount,
i_acct_assx TYPE STANDARD TABLE OF bapimepoaccountx,
i_services TYPE STANDARD TABLE OF bapiesllc ,
i_srvacc TYPE STANDARD TABLE OF bapiesklc,
i_return TYPE STANDARD TABLE OF bapiret2,
wa_header TYPE bapimepoheader,
wa_headerx TYPE bapimepoheaderx,
wa_poitem TYPE bapimepoitem,
wa_poitemx TYPE bapimepoitemx,
wa_poitem_sch TYPE bapimeposchedule,
wa_poitem_schx TYPE bapimeposchedulx,
wa_acct_*** TYPE bapimepoaccount,
wa_acct_assx TYPE bapimepoaccountx,
wa_services TYPE bapiesllc,
wa_srvacc TYPE bapiesklc,
wa_return TYPE bapiret2,
ws_po TYPE bapimepoheader-po_number.
break gbpra8.
wa_services-pckg_no = 10.
wa_services-line_no = 1.
wa_services-outl_no = '0'.
wa_services-outl_ind = c_x.
wa_services-subpckg_no = 20.
APPEND wa_services TO i_services.
wa_srvacc-pckg_no = 10.
wa_srvacc-line_no = 1.
wa_srvacc-serno_line = 01.
wa_srvacc-serial_no = 01.
wa_srvacc-percentage = 100.
APPEND wa_srvacc TO i_srvacc.
LOOP AT i_input_file INTO wa_input_file.
IF wa_input_file-column2 EQ 'HD'.
wa_header-doc_type = wa_input_file-column3.
wa_header-creat_date = sy-datum.
wa_header-created_by = sy-uname.
wa_header-vendor = wa_input_file-column4.
PERFORM conversion_output USING wa_header-vendor
CHANGING wa_header-vendor.
wa_header-comp_code = 'DE03'.
wa_header-purch_org = 'DE03'.
wa_header-pur_group = 'DE1'.
wa_header-vper_start = wa_input_file-column9.
wa_header-vper_end = wa_input_file-column10.
wa_headerx-comp_code = c_x.
wa_headerx-doc_type = c_x.
wa_headerx-creat_date = c_x.
wa_headerx-created_by = c_x.
wa_headerx-vendor = c_x.
wa_headerx-purch_org = c_x.
wa_headerx-pur_group = c_x.
wa_headerx-vper_start = c_x.
wa_headerx-vper_end = c_x.
ENDIF.
IF wa_input_file-column2 EQ 'IT'.
wa_poitem-po_item = wa_input_file-column3.
wa_poitem-short_text = wa_input_file-column6.
wa_poitem-plant = wa_input_file-column8.
wa_poitem-quantity = '1'.
wa_poitem-tax_code = 'V0'.
wa_poitem-item_cat = 'D'.
wa_poitem-acctasscat = 'K'.
wa_poitem-matl_group = wa_input_file-column7.
wa_poitem-pckg_no = '10'.
APPEND wa_poitem TO i_poitem .
wa_poitemx-po_item = wa_input_file-column3.
wa_poitemx-po_itemx = c_x.
wa_poitemx-short_text = c_x.
wa_poitemx-plant = c_x.
wa_poitemx-quantity = c_x.
wa_poitemx-tax_code = c_x.
wa_poitemx-item_cat = c_x.
wa_poitemx-acctasscat = c_x.
wa_poitemx-matl_group = c_x.
wa_poitemx-pckg_no = c_x.
APPEND wa_poitemx TO i_poitemx.
wa_poitem_sch-po_item = wa_input_file-column3.
wa_poitem_sch-delivery_date = sy-datum.
APPEND wa_poitem_sch TO i_poitem_sch.
wa_poitem_schx-po_item = wa_input_file-column3.
wa_poitem_schx-po_itemx = c_x.
wa_poitem_schx-delivery_date = c_x.
APPEND wa_poitem_schx TO i_poitem_schx.
wa_acct_***-po_item = 10.
wa_acct_***-serial_no = 01.
wa_acct_***-gl_account = '0006360100'.
wa_acct_***-co_area = '1000'.
wa_acct_***-costcenter = 'KC010000'.
APPEND wa_acct_*** TO i_acct_***.
wa_acct_***-po_item = 10.
wa_acct_***-serial_no = 02.
wa_acct_***-gl_account = '0006360100'.
wa_acct_***-co_area = '1000'.
wa_acct_***-costcenter = 'KC010000'.
APPEND wa_acct_*** TO i_acct_***.
wa_acct_assx-po_item = 10.
wa_acct_assx-serial_no = 01.
wa_acct_assx-po_itemx = c_x.
wa_acct_assx-serial_nox = c_x.
wa_acct_assx-gl_account = c_x.
wa_acct_assx-co_area = c_x.
wa_acct_assx-costcenter = c_x.
APPEND wa_acct_assx TO i_acct_assx.
wa_acct_assx-po_item = 10.
wa_acct_assx-serial_no = 02.
wa_acct_assx-po_itemx = c_x.
wa_acct_assx-serial_nox = c_x.
wa_acct_assx-gl_account = c_x.
wa_acct_assx-co_area = c_x.
wa_acct_assx-costcenter = c_x.
APPEND wa_acct_assx TO i_acct_assx.
wa_services-pckg_no = 20.
wa_services-line_no = 2.
wa_services-service = wa_input_file-column9.
wa_services-quantity = '100'.
wa_services-gr_price = '100'.
wa_services-userf1_txt = wa_input_file-column13.
APPEND wa_services TO i_services.
wa_srvacc-pckg_no = 20.
wa_srvacc-line_no = 1.
wa_srvacc-serno_line = 02.
wa_srvacc-serial_no = 02.
wa_srvacc-percentage = 100.
APPEND wa_srvacc TO i_srvacc.
ENDIF.
ENDLOOP.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = wa_header
poheaderx = wa_headerx
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
exppurchaseorder = ws_po
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
return = i_return
poitem = i_poitem
poitemx = i_poitemx
POADDRDELIVERY =
poschedule = i_poitem_sch
poschedulex = i_poitem_schx
poaccount = i_acct_***
POACCOUNTPROFITSEGMENT =
poaccountx = i_acct_assx
POCONDHEADER =
POCONDHEADERX =
POCOND =
POCONDX =
POLIMITS =
POCONTRACTLIMITS =
poservices = i_services
posrvaccessvalues = i_srvacc
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
break gbpra8.
LOOP AT i_return INTO wa_return.
ENDLOOP.
ENDFORM. " split_data
*& Form conversion_output
Conversion exit input
FORM conversion_output USING p_ip
CHANGING p_op.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = p_ip
IMPORTING
output = p_op.
ENDFORM. " conversion_output
<b>Reward points if this helps.
Manish</b> -
Updating LIFSK field of VBAK table
Hi,
I have a workarea of type VBAK.
The workarea has field VBELN and LIFSK populated.
I want to Update the field LIFSK of database table VBAK.
I assume, using statement "UPDATE" would have some implications while changing master table VBAK.
Hence i want to know if there any function module or BAPI is available to do this?
Regards
Nishant
Message was edited by: Nishant Guptahi,
check this sample...
REPORT Z_SALES_ORDER_CHANGE
NO STANDARD PAGE HEADING
LINE-SIZE 132
LINE-COUNT 65(0)
MESSAGE-ID ZZ.
TABLES: VBAP.
DATA:
V_FILEIN(90) TYPE C,
V_RECIN TYPE I,
V_RECVBAP TYPE I,
V_RECORDER TYPE I,
V_VBELN LIKE VBAP-VBELN,
ORDERHEADERINX LIKE BAPISDH1X.
DATA: BEGIN OF I_ORDERS OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
BRGEW(18) TYPE C,
VOLUM(18) TYPE C,
END OF I_ORDERS.
DATA: BEGIN OF I_OUTPUT OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
* GEWEI LIKE VBAP-GEWEI,
BRGEW LIKE VBAP-BRGEW,
VOLUM LIKE VBAP-VOLUM,
CKWGT TYPE C,
CKVOL TYPE C,
END OF I_OUTPUT.
DATA: BEGIN OF ORDERITEMIN OCCURS 0.
INCLUDE STRUCTURE BAPISDITM.
DATA: END OF ORDERITEMIN.
DATA: BEGIN OF ORDERITEMINX OCCURS 0.
INCLUDE STRUCTURE BAPISDITMX.
DATA: END OF ORDERITEMINX.
DATA: BEGIN OF RETURN OCCURS 0.
INCLUDE STRUCTURE BAPIRET2.
DATA: END OF RETURN.
DATA: BEGIN OF BAPIRETURN OCCURS 0.
INCLUDE STRUCTURE BAPIRET2.
DATA: END OF BAPIRETURN.
PARAMETERS:
P_PATH(45) TYPE C DEFAULT '/usr/users/ftpsapom/' LOWER CASE,
P_FNAME(32) TYPE C DEFAULT '/sweetjo.txt' LOWER CASE.
START-OF-SELECTION.
* CONCATENATE PATH AND FILE NAME INTO ONE VARIABLE
CONCATENATE P_PATH P_FNAME INTO V_FILEIN.
* OPEN DATASET
IF V_FILEIN IS INITIAL.
MESSAGE E002 WITH 'FILE' V_FILEIN 'DOES NOT CONTAIN ANY DATA!'.
ELSE.
OPEN DATASET V_FILEIN
FOR INPUT
IN TEXT MODE.
IF SY-SUBRC = 0.
* READ DATASET
DO.
READ DATASET V_FILEIN INTO I_ORDERS.
IF SY-SUBRC = 0.
APPEND I_ORDERS.
ELSE.
EXIT.
ENDIF.
ENDDO.
* CLOSE DATASET
CLOSE DATASET V_FILEIN.
IF SY-SUBRC <> 0.
MESSAGE E002 WITH 'ERROR - CLOSING' V_FILEIN.
ENDIF.
ELSE.
MESSAGE E002 WITH 'ERROR - COULD NOT OPEN' V_FILEIN.
ENDIF.
ENDIF.
* SORT AND REMOVE DUPLICATES FROM I_ORDERS
SORT I_ORDERS BY VBELN POSNR.
DELETE ADJACENT DUPLICATES FROM I_ORDERS.
* POPULATE I_OUTPUT
LOOP AT I_ORDERS.
SHIFT I_ORDERS-POSNR LEFT DELETING LEADING SPACE.
CONCATENATE '0' I_ORDERS-POSNR INTO I_ORDERS-POSNR.
SELECT SINGLE BRGEW VOLUM
FROM VBAP
INTO (VBAP-BRGEW, VBAP-VOLUM)
WHERE VBELN = I_ORDERS-VBELN
AND POSNR = I_ORDERS-POSNR.
IF SY-SUBRC = 0.
IF VBAP-BRGEW = 0.
I_OUTPUT-CKWGT = 'X'.
ENDIF.
IF VBAP-VOLUM = 0.
I_OUTPUT-CKVOL = 'X'.
ENDIF.
I_OUTPUT-VBELN = I_ORDERS-VBELN.
I_OUTPUT-POSNR = I_ORDERS-POSNR.
* I_OUTPUT-GEWEI = 'ST'.
I_OUTPUT-BRGEW = I_ORDERS-BRGEW.
I_OUTPUT-VOLUM = I_ORDERS-VOLUM.
APPEND I_OUTPUT.
CLEAR: I_OUTPUT.
ENDIF.
V_RECIN = V_RECIN + 1.
ENDLOOP.
* POPULATE BAPI DATA AND RUN BAPI
CLEAR: ORDERHEADERINX, ORDERITEMIN, ORDERITEMINX,
RETURN, BAPIRETURN.
REFRESH: ORDERITEMIN, ORDERITEMINX, RETURN, BAPIRETURN.
ORDERHEADERINX-UPDATEFLAG = 'U'.
LOOP AT I_OUTPUT WHERE CKWGT = 'X' OR CKVOL = 'X'.
V_RECVBAP = V_RECVBAP + 1.
IF I_OUTPUT-VBELN <> V_VBELN AND SY-TABIX <> 1.
V_RECORDER = V_RECORDER + 1.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = V_VBELN
ORDER_HEADER_INX = ORDERHEADERINX
TABLES
RETURN = RETURN
ORDER_ITEM_IN = ORDERITEMIN
ORDER_ITEM_INX = ORDERITEMINX.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = BAPIRETURN.
* WRITE OUT RETURN
LOOP AT RETURN.
WRITE: / RETURN.
ENDLOOP.
WRITE: / BAPIRETURN.
SKIP.
CLEAR: ORDERITEMIN, ORDERITEMINX,
RETURN, BAPIRETURN.
REFRESH: ORDERITEMIN, ORDERITEMINX, RETURN, BAPIRETURN.
ENDIF.
ORDERITEMIN-ITM_NUMBER = I_OUTPUT-POSNR.
* ORDERITEMIN-UNTOF_WGHT = I_OUTPUT-GEWEI.
IF NOT I_OUTPUT-CKWGT IS INITIAL.
ORDERITEMIN-GROSS_WGHT = I_OUTPUT-BRGEW.
ORDERITEMINX-GROSS_WGHT = 'X'.
ENDIF.
IF NOT I_OUTPUT-CKVOL IS INITIAL.
ORDERITEMIN-VOLUME = I_OUTPUT-VOLUM.
ORDERITEMINX-VOLUME = 'X'.
ENDIF.
APPEND ORDERITEMIN.
ORDERITEMINX-ITM_NUMBER = I_OUTPUT-POSNR.
* ORDERITEMINX-UNTOF_WGHT = 'X'.
ORDERITEMINX-UPDATEFLAG = 'U'.
APPEND ORDERITEMINX.
V_VBELN = I_OUTPUT-VBELN.
ENDLOOP.
* RUN BAPI ON LAST ORDER
IF NOT ORDERITEMIN IS INITIAL.
V_RECORDER = V_RECORDER + 1.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = V_VBELN
ORDER_HEADER_INX = ORDERHEADERINX
TABLES
RETURN = RETURN
ORDER_ITEM_IN = ORDERITEMIN
ORDER_ITEM_INX = ORDERITEMINX.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = BAPIRETURN.
* WRITE OUT RETURN
LOOP AT RETURN.
WRITE: / RETURN.
ENDLOOP.
WRITE: / BAPIRETURN.
SKIP.
ENDIF.
* WRITE OUT RECORD COUNT FROM FILE
WRITE: / 'RECORD COUNT FROM FILE ', V_RECIN.
SKIP.
* WRITE OUT RECORD COUNT FROM FILE
WRITE: / 'RECORD COUNT OF LINES TO CHANGE ', V_RECVBAP.
SKIP.
* WRITE OUT RECORD COUNT FROM FILE
WRITE: / 'RECORD COUNT OF ORDERS TO CHANGE ', V_RECORDER.
SKIP.
* TOP OF PAGE
TOP-OF-PAGE.
WRITE:/1(5) TEXT-H01, 6(8) SY-DATUM MM/DD/YY,
100(8) TEXT-H02, 126(8) SY-PAGNO.
WRITE:/1(5) TEXT-H03, 6(8) SY-UZEIT USING EDIT MASK '__:__:__',
20(77) TEXT-H04,
100(8) TEXT-H05, 108(25) SY-REPID.
WRITE:/1(6) TEXT-H06, 8(12) SY-UNAME,
20(4) TEXT-H07, 25(32) SY-HOST,
100(13) TEXT-H08, 121(8) SY-SYSID,
129 '/', 130(3) SY-MANDT.
ULINE.
SKIP.
here i am changing the items, but in your case it is simple.
only thing you need to pass is
VALUE(SALESDOCUMENT) LIKE BAPIVBELN-VBELN
*" VALUE(ORDER_HEADER_IN) LIKE BAPISDH1 STRUCTURE BAPISDH1
*" OPTIONAL
*" VALUE(ORDER_HEADER_INX) LIKE BAPISDH1X STRUCTURE BAPISDH1X
first one is sales order, sencond is ORDER_HEADER_IN-del_block , and third one is ORDER_HEADER_INX -updflag = 'U' and relevant field for lifsk = 'X' .
try this and get back if you have any doubts.
Regards
vijay -
Error using Bapi_PO_Change for update custom fields
Dear Expert,
I have requirement for update custom field in table ekko. I used BAPI_PO_CHANGE with PO_number as a key. Then i put the value of custom field in segment TABLES - EXTENSIONIN.
But I get error : "ERROR TRANSFERING EXTENSIONIN DATA FOR ENHANCEMENT CI_EKKODB".
When I checked, I found the difference between data type the value for BAPI_PO_CHANGE (Usinf structure BAPIPAREX) and data type for custom field in table EKKO.
Data Type in BAPI_PO_CHANGE is CHAR (you can see in structure BAPIPAREX). And data type for the custom field is DECIMAL.
I found the note '1124803', but the correction note was not applicable for us because our released system is 500.
Is there any suggestion or solution for resolve our problem?
Really appreciate your help.
Thanks.Hi Laxmikanth Bethi ,
I tried with BAPI_PO_CHANGE in level header, and SAP was support the BAPI. And also i tried to appending the same fields in MEPOHEADR & MEPOHEADERX structures, but the problem is the type of my custom fields are DECIMAL, then the type MEPOHEADR & MEPOHEADERX structures are CHARACTER. So i got the error : "ERROR TRANSFERING EXTENSIONIN DATA FOR ENHANCEMENT CI_EKKODB".
Because the types are difference.
Have you any suggestion to solve this problem?
Really appreciate for your input. -
Custom fields appended in /SAPAPO/MM_DOC table gets cleared after BOP
Hi,
I appended few fields in /SAPAPO/MM_DOC table for STO's. I was able to populate it from ECC.
But once the BOP job has run all these custom fields are getting cleared.
Can someone tell me how to fix this.
Thanks
KranthiHi Vaibhav,
Some of the custom fields has been added to /SAPAPO/MM_DOC table in SCM to populate data of STO's in ECC.
These custom fields will be updated using BADI's in SCM.
When the Back Order Processing(BOP) runs on SCM for these STO's these fields whatever has been updated from ECC are cleared.
How can I stop clearing these custom fields.
Can I use any exits or BADI's which can update these fields during BOP.
Regards,
Kranthi -
Updating extended fields in SRM Business Partner Web Dynpro UI does not work
Hey community,
I'd like to extend the SAP SRM Business Partner Web Dynpro (SRM 7.13). I did it like in SAP Note 1386310 described. Everything works fine, the fields show the correct data. But updating these fields does not have any effect.
I only want to extend the existent fields NAME_ORG3 and NAME_ORG4. I did the following steps:
- Because of the fact that the fields are existent and not custom, I skipped the extension of structures INCL_EEW_BUT000 and INCL_EEW_BUT000_X (ok, in utter despair I even tried this, but of course I got the message "fields already exist...")
- I added the 2 fields to the SRM business partner data transfer structure INCL_EEW_BP_CSF_COMPANY_DATA.
- In Web Dynpro /SAPSRM/WDC_MODC_NAME, view V_PS_OIF_NAME I added the fields NAME_ORG3 and NAME_ORG4 to the context node COMPANY_DATA
- I added corresponding Input fields and labels to the WD layout.
- in view /sapsrm/v_mdfsbc I customized the new fields
-> the new fields are visible in the WD, and, oh wow, they even show the correct data!
-> Unfortunately, updating the fields does not work, but000 does not get any data.
Debugging the function "bupa_central_extincl_change" brings up, that function BUP_MEMORY_BUT000_GET gets a but000 structure with filled NAME_ORG1 and NAME_ORG2, but NAME_ORG3 and NAME_ORG4 are empty.
I also regarded SAP Note 1453747, but the code was already right.
Any Ideas? Many thanks in advance!
SteffiHi Stefanie Krause,
I am also facing the same problem
I added the one fields "APPROVAL_EMAIL” to the SRM business partner, data transfer structure '/SAPSRM/S_CLL_BP_COMPANY_DATA ' . I have appended the structure.
I added corresponding Input fields and labels to the WD layout.
-> the new fields are visible in the WD,
-> i am able to visible the input field in WD,
But if add some value press on next tab and back to the screen the value will be refreshed .
Kindly help me
Thanks and Regards,
Maruthi.M -
Updating EAN11 field in mara table through BAPI_MATERIAL_SAVEDATA
Hi,
I want to update EAN11 field in mara table through BAPI_MATERIAL_SAVEDATA could anybody please guide me how to achieve.
it would be great if is there any sample code for the same.
ThanksPlease give the following fields in the lwa_uom structure as well
lwa_uom -ALT_UNIT
lwa_uom -NUMERATOR
lwa_uom -DENOMINATR
DATA: lwa_uom TYPE BAPI_MARM,
lwa_uomx TYPE BAPI_MARMX.
DATA: lt_uomx TYPE STANDARD TABLE OF BAPI_MARM,
lt_uomx TYPE STANDARD TABLE OF BAPI_MARMX.
lwa_uom-ean_upc = '123456' " enter the value here
lwa_uom-ean_cat = 'abcd'.
append lwa_uom to lt_uom.
lwa_uomx-ean_upc = 'X'.
lwa_uomx-ean_cat = 'X'.
append lwa_uomx to lt_uomx.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
unitsofmeasure = lt_uom
unitsofmeasurex = lt_uomx.
Edited by: Rahul Babukuttan on Dec 21, 2011 4:23 PM
Maybe you are looking for
-
FI and PCA doesn't match/Receivables and Payables?
Hi! I have a problem with Profit center accounting. I try to match receivables and payables in FI and PCA, but they don't match (transaction KE5T). If I look transaction 1KEK, e.g. account xxxx shows 500.000 EUR. When I look e.g. transaction FS10N, t
-
Error installing 365 Pro Plus from deployment tool
I have 1 Windows 7 x64 PC which is failing to install from the deployment tool. It is built from the same image as 50-60 other PCs which had no issues installing using the same XML configuration file and network share. The log always shows the same f
-
Monitoring /var/adm/messages
Hello to all, we are developing system for monitoring of the servers trough reading of the /var/adm/messages file. Since there are numerous messages in this file we are wondering what regular expressions to use in order to extract serious/critical al
-
I was just reading up on FlexConnect, and found this seriouly flawed example config. How does something like this manage to get published? Really!!! http://www.cisco.com/en/US/partner/docs/wireless/controller/7.4/configuration/guides/flexconnect/conf
-
ive got a bb pearl 9105 and everytime i turn it on its come up with error messages then comes up with a white screen that says error 523. i cant plug it into my comp as the charge port is broken and cant get rid of the error messages to activate the