Deleting multiple POs are header level
Hi,
We are in SRM 5.0, is there any function module by which we can delete old POs at header level.
Rgds,
Madhan
See the foll link:
Re: How to delete a PO in SRM
Similar Messages
-
How to delete a PO at header level - Restrict to a specific order type
Hi,
Deletetion of PO at header level is not recomended but still in my project they are using it to delete a particular PO type and should not allow to delete the other PO types. Recently Support Pack upgrade was done. After this activity deletion is not happening. Hope the relevent code got over writed with the original.
Here creation and change of PO will be done from a third party system through IDOC. Deletion of PO at header level should be possible only through IDOC.
Can some one give me the idea where(BAdI/Enhancement) we need to write the code to allow the deletion of PO of a particular type?
Regards,
Balaram DevineniHope you are referring to "setting of deletion indicator at header level of PO" (EKKO-LOEKZ = 'L'). Standard method CL_PO_HEADER_HANDLE_MM->PO_CANCEL may be helpful (you may have to integrate this with IDOC processing function module). Wiki post [Purchase Order Cancellation (Header) using ABAP Classes|http://wiki.sdn.sap.com/wiki/display/ABAP/PurchaseOrderCancellation%28Header%29usingABAPClasses] will be a good reference.
-
Delete sales employee in header level with BAPI_CUSTOMERQUOTATION_CHANGE
hi experts,
I try to delete sales employee in header level, but i always get the error message:
FB call: insufficient parameters
The sales document is not yet complete: Edit data
Sales document 0007002015 was not changed
Please give a light how to delete sales employee successfully . Thank you very much!!
My program:
REPORT z_test_change_partner .
DATA:
order_header_inx LIKE bapisdh1x,
order_header_in LIKE bapisdh1,
return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
quotation_item_inx LIKE bapisditmx OCCURS 0 WITH HEADER LINE,
partners LIKE bapiparnr OCCURS 0 WITH HEADER LINE,
partnerchanges LIKE bapiparnrc OCCURS 0 WITH HEADER LINE
order_header_inx-updateflag = 'U'.
quotation_item_inx-updateflag = 'U'.
quotation_item_inx-itm_number = '000010'.
APPEND quotation_item_inx.
CLEAR partners.
partners-partn_role = 'VE'.
partners-partn_numb = '00001000'.
APPEND partners.
CLEAR partnerchanges.
partnerchanges-document = '0007002015'.
partnerchanges-itm_number = '000000'.
partnerchanges-updateflag = 'D'.
partnerchanges-partn_role = 'VE'.
*partnerchanges-p_numb_old = '00001111'.
*partnerchanges-p_numb_new = '00001000'.
APPEND partnerchanges.
CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE'
EXPORTING
salesdocument = '0007002015'
quotation_header_in = order_header_in
quotation_header_inx = order_header_inx
SIMULATION =
BEHAVE_WHEN_ERROR =
INT_NUMBER_ASSIGNMENT =
LOGIC_SWITCH =
NO_STATUS_BUF_INIT = ' '
TABLES
return = return
QUOTATION_ITEM_IN =
quotation_item_inx = quotation_item_inx
partners = partners
partnerchanges = partnerchanges
PARTNERADDRESSES =
CONDITIONS_IN =
CONDITIONS_INX =
QUOTATION_CFGS_REF =
QUOTATION_CFGS_INST =
QUOTATION_CFGS_PART_OF =
QUOTATION_CFGS_VALUE =
QUOTATION_CFGS_BLOB =
QUOTATION_CFGS_VK =
QUOTATION_CFGS_REFINST =
SCHEDULE_LINES =
SCHEDULE_LINESX =
QUOTATION_TEXT =
QUOTATION_KEYS =
EXTENSIONIN =
LOOP AT return.
WRITE / return-message.
ENDLOOP.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
RETURN =Hi Edith,
Thank you very much for your reply.
I changed my program by following your steps in the reply. Now the BAPI is showing error messages: "Instance 7200000060 of object type PurchaseOrder could not be changed" and "Price without service not allowed".
Please refer my code below.
poitem-po_item = '0010'.
poitem-pckg_no = '0000001964'.
poitem-item_cat = '9'.
APPEND poitem.
poitemx-po_item = '10'.
poitemx-po_itemx = 'X'.
poitemx-pckg_no = 'X'.
poitemx-item_cat = 'X'.
APPEND poitemx.
Parent line
poservices-pckg_no = '0000001964'.
poservices-line_no = '0000000001'.
poservices-ext_line = '0000000000'.
poservices-subpckg_no = '0000001965'.
poservices-matl_group = '01040107'.
*poservices-delete_ind = 'X'.
*poservices-quantity = ' '.
*poservices-base_uom = ' '.
*poservices-gr_price = ' '.
APPEND poservices.
CLEAR: poservices.
Child line.
poservices-pckg_no = '0000001965'.
poservices-line_no = '0000000002'.
poservices-ext_line = '0000000010'.
poservices-quantity = '1'.
poservices-service = '000000000005000010'.
poservices-base_uom = 'EA'.
poservices-gr_price = '150'.
poservices-subpckg_no = '0000000000'.
poservices-matl_group = '01040107'.
poservices-delete_ind = 'X'.
APPEND poservices.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = '7200000060'
TABLES
return = return[]
poitem = poitem[]
poitemx = poitemx[]
poservices = poservices[]
posrvaccessvalues = posrvaccessvalues[].
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Regards,
Revanth -
What are Header Level, Item Level and Schedule Level data?
Hi ,
Can anyone plz explain me what are Header Level, Item Level and Schedule Level Data in the R/3 system , means what actually is the data structure they contain. If is there any document or links available plz do send. Urgent.
Thanks
Prashant singhalHi Prashant,
check this link.
[Extractors;
Regards,
Harold. -
Query on PO Deletion at Header Level
Hello Everybody,
We are using SRM 4.5 system (standalone without any MM backend). Our business needs to Delete POs which have already been ordered. Currently SAP is allowing us to delete the PO items once a PO is Ordered. But our requirement is to delete the PO from the header level itself, i.e., even if the PO is in ordered status, the Delete option at PO Header level should be present and allowed. Is there any way to achieve this requirement?
Kindly help.
Thanks and Regards,
DebanjanHi,
There is no option to configure at header.
Thanks -
Delete the PO at the header level after it has been output sucessfully
Can we change the status of a Purchase order in SRM from 'ordered' to 'deleted' ?
It seems we can do it only if the PO has not been output successfully.
I have checked for a few POs and found for such POs if you go ti change mode , the delete button at the header level
does not become enabled.
But I have found a PO in the system which was output suceessfully but its status is deleted. The PO has not been transfered to ECC .
Please help .
I do not want to forcibly change the status from the backend.We have some BI reports which requires the POs to be deleted at the header level
-
BADI enhancement for Enjoy PO Tcodes at "header level".
I could successfully add an item level tab to MEXXN PO tcodes. Somebody help me with the ME_GUI_PO_CUST and ME_PROCESS_PO implementations to add a customer field , say ZZ_ETYP in a separate header level tab "Expense type".
Do I need to add subscreen2 attribute to the implementing class ?
Will one structure do for both header and item level data ?
Do I need to create a separate table ( like ZMEPO_BADI_EXAMPL for items ) for the header also ?
It would be gr8 if i could get the code for the above BADIs and MEPOBADIEX's function modules.Dear Iyer,
Kindly go through the code.. hope this will help you...
<b>DETAILED DATABASE DESIGN SPECIFICATIONS</b>
<b>1. ZTPTP_HEADER</b>
Header: Expense Type
Field Name Field Type Key Information Field Description
MANDT MANDT X Client
EBELN EBELN X Purchasing Document Number
ZZ_EXPTYPE ZZEXPTYPE Expense Type
<b>2. ZTPTP_ITEM</b>
Item: Retainage
Field Name Field Type Key Information Field Description
MANDT MANDT X Client
EBELN EBELN X Purchasing Document Number
EBELP EBELP X Item Number of Purchasing Document
ZZ_RETAINAGE ZZRETAINAGE Retainage
<b>3. ZSPTP_HEADER</b>
PO Enhancement structure: Header
Field Name Field Type Key Information Field Description
EBELN EBELN Purchasing Document Number
ZZ_EXPTYPE ZZEXPTYPE Expense Type
<b>4. ZSPTP_ITEM</b>
PO Enhancement structure: Item
Field Name Field Type Key Information Field Description
EBELN EBELN Purchasing Document Number
EBELP EBELP Item Number of Purchasing Document
ZZ_RETAINAGE ZZRETAINAGE Retainage
Detailed logic
<b>LZPTP_PORETAINAGETOP (TOP INCLUDE) FG: ZPTP_PORETAINAGE</b>
persistent item data
data: git_persistent_data type sorted table of ztptp_item
with unique key mandt ebeln ebelp,
actual item data
git_data type sorted table of ztptp_item
with unique key mandt ebeln ebelp.
persistent header data
data: git_persistent_head type sorted table of ztptp_header
with unique key mandt ebeln ,
actual header data
git_head type sorted table of ztptp_header
with unique key mandt ebeln .
dynpro output structure
tables: zsptp_item,
zsptp_header.
definitions required for dynpro/framework integration
data: ok-code type sy-ucomm.
Following is a SAP include.
include lmeviewsf01.
<b>1. ZPTP_COMMIT_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_COMMIT. In this Function module we update the database table ZTPTP_HEADER i.e. as per a change / insert or delete command at the header level. This database tables size will always be low. It just contains the PO s data just being edited or created.
The interface would look like:
TABLES
IMT_DATA_NEWHD STRUCTURE ZTPTP_HEADER
IMT_DATA_OLDHD STRUCTURE ZTPTP_HEADER
Comparing the old and new data we update 3 different internal tables and using these we can update the internal tables ZTPTP_HEADER before actually updating the database table EKKO.A similar logic is coded in the sample FM : MEPOBADIEX_COMMIT
<b>
2. ZPTP_COMMIT_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_COMMIT. In this Function module we update the database table ZTPTP_HEADER i.e. as per a change / insert or delete command at the item level. This database tables size will always be low. It just contains the PO s latest data just being edited or created.
The interface would look like :
TABLES
IMT_DATA_NEW STRUCTURE ZTPTP_ITEM
IMT_DATA_OLD STRUCTURE ZTPTP_ITEM
Comparing the old and new data we update 3 different internal tables and using these we can update the internal tables ZTPTP_HEADER before actually updating the database table EKPO. A similar logic is coded in the sample FM : MEPOBADIEX_COMMIT
<b>3. ZPTP_GET_DATA_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_GET_DATA. This FM is responsible for updating an internal table (git_head) which would hold the data the user has changed or created or displayed till the current point of time. It would also hold the latest customer header data that is to be displayed in case of a change transaction.
The interface would be as follows:
Local Interface:
IMPORTING
REFERENCE(IM_EBELN) TYPE EBELN
REFERENCE(IM_EBELP) TYPE EBELP OPTIONAL
EXPORTING
REFERENCE(EX_HEAD) TYPE ZTPTP_HEADER
Read expense type from git_header. If not found, get expense value from EKKO.
<b>4. ZPTP_GET_DATA_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_GET_DATA. This FM is responsible for updating an internal table (git_data) which would hold the data the user has changed or created or displayed till the current point of time. It would also hold the latest customer item data that is to be displayed in case of a change transaction.
The interface would be as follows:
Local Interface:
IMPORTING
REFERENCE(IM_EBELN) TYPE EBELN
REFERENCE(IM_EBELP) TYPE EBELP
EXPORTING
VALUE(EX_DATA) TYPE ZTPTP_ITEM
Read Retainage from git_data. If not found, get Retainage value from EKPO.
<b>5. ZPTP_INIT FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_INIT. This FM is responsible for clearing the header and item internal tables.
clear: git_persistent_data[], git_data[],git_persistent_head[],git_head[].
<b>6. ZPTP_OPEN FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_OPEN. This FM is responsible for existing information from respective database tables.
The interface would be as follows:
Local Interface:
IMPORTING
REFERENCE(IM_EBELN) TYPE EBELN
Get Expense type and Retainage from customer created Tables and assign it to respective global internal tables.
<b>7. ZPTP_POP_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_POP. This FM is responsible for getting header values from screen fields.
The interface would be as follows:
Local Interface:
EXPORTING
REFERENCE(EX_DYNP_DATAHD) TYPE ZSPTP_HEADER
get dynpro data
ex_dynp_datahd = zsptp_header.
<b>8. ZPTP_POP_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_POP. This FM is responsible for getting item values from screen fields.
The interface would be as follows:
Local Interface:
EXPORTING
REFERENCE(EX_DYNP_DATA) TYPE ZSPTP_ITEM
get dynpro data
ex_dynp_data = zsptp_item.
<b>9. ZPTP_POST_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_POST. This FM is responsible for preparing header data for posting.
Local Interface:
IMPORTING
VALUE(IM_EBELN) TYPE EBELN
prepare customers data for posting
check not im_ebeln is initial.
lit_data_newhd[] = git_head.
lit_data_oldhd[] = git_persistent_head.
lwa_head-mandt = sy-mandt.
lwa_head-ebeln = im_ebeln.
modify lit_data_newhd from lwa_head transporting mandt ebeln where ebeln is initial.
Commit data in Database ztptp_header.
call function 'ZPTP_COMMIT_HEADER'
tables
imt_data_newhd = lit_data_newhd
imt_data_oldhd = lit_data_oldhd.
<b>10. ZPTP_POST_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_POST. This FM is responsible for preparing item data for posting.
"Local Interface:
IMPORTING
VALUE(IM_EBELN) TYPE EBELN
data: lwa_data like line of git_data,
lit_data_new type standard table of ztptp_item,
lit_data_old type standard table of ztptp_item.
prepare customers data for posting
check not im_ebeln is initial.
lit_data_new[] = git_data.
lit_data_old[] = git_persistent_data.
lwa_data-mandt = sy-mandt.
lwa_data-ebeln = im_ebeln.
modify lit_data_new from lwa_data transporting mandt ebeln where ebeln is initial.
Commit data in Database ztptp_item.
call function 'ZPTP_COMMIT_ITEM' in update task
tables
imt_data_new = lit_data_new
imt_data_old = lit_data_old.
<b>11. ZPTP_PUSH_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_PUSH. This FM is responsible for populating header values to screen fields.
Local Interface:
IMPORTING
REFERENCE(IM_DYNP_DATAHD) TYPE ZSPTP_HEADER
set dynpro data
zsptp_header = im_dynp_datahd .
<b>12. ZPTP_PUSH_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_PUSH. This FM is responsible for populating item values to screen fields.
Local Interface:
IMPORTING
REFERENCE(IM_DYNP_DATA) TYPE ZSPTP_ITEM
set dynpro data
zsptp_item = im_dynp_data .
<b>13. ZPTP_SET_DATA_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_SET_DATA. This FM is responsible for keep update header information in git_header.
delete a line from git_data
delete table git_head with table key mandt = sy-mandt
ebeln = im_datahd-ebeln.
update customer data
read table git_head assigning <lf_datahd> with table key
mandt = sy-mandt
ebeln = im_datahd-ebeln.
if sy-subrc is initial.
update existing data
<lf_datahd>-zz_exptype = im_datahd-zz_exptype.
else.
make a new entry into the data table
lwa_head = im_datahd.
lwa_head-mandt = sy-mandt.
insert lwa_head into table git_head.
endif.
<b>14. ZPTP_SET_DATA_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_SET_DATA. This FM is responsible for keep update item information in git_data.
delete a line from git_data
delete table git_data with table key mandt = sy-mandt
ebeln = im_data-ebeln
ebelp = im_data-ebelp.
update customer data
read table git_data assigning <lf_data> with table key
mandt = sy-mandt
ebeln = im_data-ebeln
ebelp = im_data-ebelp.
if sy-subrc is initial.
update existing data
<lf_data>-zz_retainage = im_data-zz_retainage.
else.
make a new entry into the data table
lwa_data = im_data.
lwa_data-mandt = sy-mandt.
insert lwa_data into table git_data.
endif.
<b>DETAILED SCREEN DESIGN SPECIFICATIONS</b>
<b>screen 0002</b>
Item Retainage
ZSPTP_ITEM-ZZ_RETAINAGE DEC 5 Retainage
Screen Logic / Process before Output
call method call_view->handle_event( 'PBO' ).
Screen Logic / Process after Input
call method call_view->handle_event( 'PAI' )
<b>Screen 0003</b>
Header: Expense type
ZSPTP_HEADER-ZZ_EXPTYPE NUMC 4 Expense Type
Screen Logic / Process before Output
call method call_view->handle_event( 'PBO' ).
Screen Logic / Process after Input
call method call_view->handle_event( 'PAI' )
<b>DETAILED CLASS DESIGN SPECIFICATIONS</b>
<b>A. ZCL_IM_ME_GUI_PO_CUST</b>
Description
Imp. Class ZME_GUI_PO_CUST
Attributes
Name Level Visibility Type
SUBSCREEN1 Constant Public MEPO_NAME
SUBSCREEN2 Constant Public MEPO_NAME
DYNP_DATA_PBO Instance Attribute Private ZSPTP_ITEM
DYNP_DATA_PAI Instance Attribute Private ZSPTP_ITEM
DYNP_DATA_PBOHD Instance Attribute Private ZSPTP_HEADER
DYNP_DATA_PAIHD Instance Attribute Private ZSPTP_HEADER
Methods
Name Level Visibility
IF_EX_ME_GUI_PO_CUST~SUBSCRIBE Instance Attribute Public
IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS Instance Attribute Public
IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_MODEL Instance Attribute Public
IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_DYNP Instance Attribute Public
IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_DYNP Instance Attribute Public
IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_MODEL Instance Attribute Public
<b>1. SUBSCRIBE</b>
Description
Publisch Customer's Own Screens
Detailed logic
when lc_item.
the name is a unique identifier for the subscreen and defined in this class definition
lwa_subscriber-name = subscreen1.
the dynpro number to use
lwa_subscriber-dynpro = '0002'.
the program where the dynpro can be found
lwa_subscriber-program = 'SAPLZPTP_PORETAINAGE'.
each subscreen needs his own DDIC-Structure
lwa_subscriber-struct_name = 'ZSPTP_ITEM'.
a label can be defined
lwa_subscriber-label = text-001.
the position within the tabstrib can be defined
lwa_subscriber-position = 1.
lwa_subscriber-height = 7.
append lwa_subscriber to re_subscribers.
Header subscreen
when lc_header.
the name is a unique identifier for the subscreen and defined in this class definition
lwa_subscriber-name = subscreen2.
the dynpro number to use
lwa_subscriber-dynpro = '0003'.
the program where the dynpro can be found
lwa_subscriber-program = 'SAPLZPTP_PORETAINAGE'.
each subscreen needs his own DDIC-Structure
lwa_subscriber-struct_name = 'ZSPTP_HEADER'.
a label can be defined
lwa_subscriber-label = text-002.
the position within the tabstrib can be defined
lwa_subscriber-position = 1.
lwa_subscriber-height = 7.
append lwa_subscriber to re_subscribers.
endcase.
<b>2. MAP_DYNPRO_FIELDS</b>
Description
Build Up Field Catalog
Detailed logic
loop at ch_mapping assigning <lf_mapping>.
*Assignment of metafields to the customer fields.
case <lf_mapping>-fieldname.
when 'EBELN'. <lf_mapping>-metafield = mmmfd_preq_no_po.
when 'EBELP'. <lf_mapping>-metafield = mmmfd_preq_item_po.
when 'ZZ_RETAINAGE'. <lf_mapping>-metafield = mmmfd_cust_01.
when 'ZZ_EXPTYPE'. <lf_mapping>-metafield = mmmfd_cust_02.
endcase.
endloop.
<b>
3. TRANSPORT_FROM_MODEL</b>
Description
Data Transport from Business Object
Detailed logic
when subscreen1.
Get the item object
mmpur_dynamic_cast lif_item im_model.
check not lif_item is initial.
lwa_mepoitem = lif_item->get_data( ).
transport customer fields
call function 'ZPTP_GET_DATA_ITEM'
exporting
im_ebeln = lwa_mepoitem-ebeln
im_ebelp = lwa_mepoitem-ebelp
importing
ex_data = lwa_customer.
store info for later use
move-corresponding lwa_mepoitem to dynp_data_pbo.
move lwa_customer-zz_retainage to dynp_data_pbo-zz_retainage.
when subscreen2.
Get the header object
mmpur_dynamic_cast lif_header im_model.
check not lif_header is initial.
transport standard fields
lwa_mepohead = lif_header->get_data( ).
transport customer fields
call function 'ZPTP_GET_DATA_HEADER'
exporting
im_ebeln = lwa_mepohead-ebeln
importing
ex_head = lwa_customerhd.
store info for later use
move-corresponding lwa_mepohead to dynp_data_pbohd.
if not lwa_customerhd-zz_exptype is initial.
move lwa_customerhd-zz_exptype to dynp_data_pbohd-zz_exptype.
else.
move dynp_data_paihd-zz_exptype to dynp_data_pbohd-zz_exptype.
endif.
when others.
endcase.
<b>4. TRANSPORT_TO_DYNP</b>
Description
Data Transport to Screen
Detailed logic
case im_name.
when subscreen1 .
Pushing item data to screen fields
call function 'ZPTP_PUSH_ITEM'
exporting
im_dynp_data = dynp_data_pbo.
when subscreen2 .
Pushing header data to screen fields
call function 'ZPTP_PUSH_HEADER'
exporting
im_dynp_datahd = dynp_data_pbohd.
when others.
endcase.
<b>5. TRANSPORT_FROM_DYNP</b>
Description
Data Transport from Screen
Detailed logic
case im_name.
when subscreen1.
Getting item data from screen fields
call function 'ZPTP_POP_ITEM'
importing
ex_dynp_data = dynp_data_pai.
if dynp_data_pai ne dynp_data_pbo
or dynp_data_paihd ne dynp_data_pbohd.
If data changed we have to notify the framework
to transport data to the model
re_changed = mmpur_yes.
endif.
when subscreen2.
Getting header data from screen fields
call function 'ZPTP_POP_HEADER'
importing
ex_dynp_datahd = dynp_data_paihd.
if dynp_data_paihd ne dynp_data_pbohd
or dynp_data_pai ne dynp_data_pbo.
If data changed we have to notify the framework
to transport data to the model
re_changed = mmpur_yes.
endif.
when others.
endcase.
<b>6. TRANSPORT_TO_MODEL</b>
Description
Treatment of Function Codes
Detailed logic
case im_name.
when subscreen1.
is it an item? im_model can be header or item.
mmpur_dynamic_cast lif_item im_model.
check not lif_item is initial.
lwa_mepoitem = lif_item->get_data( ).
standard fields changed?
if dynp_data_pbo-ebeln ne dynp_data_pai-ebeln or
dynp_data_pbo-ebelp ne dynp_data_pai-ebelp or
dynp_data_pbo-zz_retainage ne dynp_data_pai-zz_retainage.
update standard fields
lwa_mepoitem-ebeln = dynp_data_pai-ebeln.
lwa_mepoitem-ebelp = dynp_data_pai-ebelp.
lwa_mepoitem-zzretainage = dynp_data_pai-zz_retainage.
call method lif_item->set_data( lwa_mepoitem ).
endif.
customer fields changed?
if dynp_data_pbo-zz_retainage ne dynp_data_pai-zz_retainage.
call function 'ZPTP_GET_DATA_ITEM'
exporting
im_ebeln = lwa_mepoitem-ebeln
im_ebelp = lwa_mepoitem-ebelp
importing
ex_data = lwa_customer.
lwa_customer-zz_retainage = dynp_data_pai-zz_retainage.
Commit changes to database.
call function 'ZPTP_SET_DATA_ITEM'
exporting
im_data = lwa_customer.
endif.
when subscreen2.
is it an header? im_model can be header or item.
mmpur_dynamic_cast lif_header im_model.
check not lif_header is initial.
lwa_mepohead = lif_header->get_data( ).
standard fields changed?
if dynp_data_pbohd-ebeln ne dynp_data_paihd-ebeln or
dynp_data_pbohd-zz_exptype ne dynp_data_paihd-zz_exptype.
update standard fields
lwa_mepohead-ebeln = dynp_data_paihd-ebeln.
lwa_mepohead-zzexptype = dynp_data_paihd-zz_exptype.
call method lif_header->set_data( lwa_mepohead ).
endif.
customer fields changed?
if dynp_data_pbohd-zz_exptype ne dynp_data_paihd-zz_exptype.
call function 'ZPTP_GET_DATA_HEADER'
exporting
im_ebeln = lwa_mepohead-ebeln
importing
ex_head = lwa_customerhd.
lwa_customerhd-zz_exptype = dynp_data_paihd-zz_exptype.
Commit changes to database.
call function 'ZPTP_SET_DATA_HEADER'
exporting
im_datahd = lwa_customerhd.
endif.
when others.
endcase.
<b>
B. ZCL_IM_ME_PROCESS_PO_CUST</b>
Description
Imp. Class for BAdI imp. ZME_PROCESS_PO_CUST
Methods
Name Level Visibility
IF_EX_ME_PROCESS_PO_CUST~INITIALIZE Instance Attribute Public
IF_EX_ME_PROCESS_PO_CUST~OPEN Instance Attribute Public
IF_EX_ME_PROCESS_PO_CUST~PROCESS_HEADER Instance Attribute Public
IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM Instance Attribute Public
IF_EX_ME_PROCESS_PO_CUST~POST Instance Attribute Public
IF_EX_ME_PROCESS_PO_CUST~CLOSE Instance Attribute Public
<b>
1. INITIALIZE</b>
Description
Initializations (Invoked Once Only)
Detailed logic
initializations
call function 'ZPTP_INIT'.
<b>2. OPEN</b>
Description
Open a Purchase Order
Detailed logic
data: lwa_mepoheader type mepoheader.
read customer data
this has to be done when we open a persistent object
check im_trtyp eq 'V' or im_trtyp eq 'A'.
lwa_mepoheader = im_header->get_data( ).
read customer data from database
call function 'ZPTP_OPEN'
exporting
im_ebeln = lwa_mepoheader-ebeln.
<b>3. PROCESS_HEADER</b>
Description
Processing of Header Data
Detailed logic
data: lwa_mepohead type mepoheader,
lwa_customerhd type ztptp_header.
include mm_messages_mac. "useful macros for message handling
here we check customers data
lwa_mepohead = im_header->get_data( ).
if lwa_mepohead-loekz eq 'D'.
a physical deletion of the header was carried out.
lwa_customerhd-ebeln = lwa_mepohead-ebeln.
call function 'ZPTP_SET_DATA_HEADER'
exporting
im_datahd = lwa_customerhd
im_physical_delete_request = 'X'.
endif.
<b>4. PROCESS_ITEM</b>
Description
Processing of Item Data
Detailed logic
data: lwa_mepoitem type mepoitem,
lwa_customer type ztptp_item.
include mm_messages_mac. "useful macros for message handling
here we check customers data
lwa_mepoitem = im_item->get_data( ).
if lwa_mepoitem-loekz eq 'D'.
a physical deletion of the item was carried out. therrefor we have to
delete customer data on the level of the item
lwa_customer-ebeln = lwa_mepoitem-ebeln.
lwa_customer-ebelp = lwa_mepoitem-ebelp.
call function 'ZPTP_SET_DATA_ITEM'
exporting
im_data = lwa_customer
im_physical_delete_request = 'X'.
endif.
<b>5. POST</b>
Description
Post
Detailed logic
*Posting header data
call function 'ZPTP_POST_HEADER'
exporting
im_ebeln = im_ebeln.
*Posting item data
call function 'ZPTP_POST_ITEM'
exporting
im_ebeln = im_ebeln.
<b>
6. CLOSE</b>
Description
Closing Processing
Detailed logic
close customer data
call function 'ZPTP_INIT'. -
To be able to report by business area at a header level
Business area reporting at a header level in Procurement/AP Subject Areas
At present client is doing a large number of manual lookups in Excel to add Business area detail to certain OBI procurement reports. Reasons for why we are having to do this includes that the report is written at a header level but the business area detail is stored at a distribution level or the document has no distribution lines.
What client would therefore like is for us to devise solutions that would allow us to include the business area detail. Possible solutions that I can think of include doing a join between the employee name, preparer name and requestor name to the HR business area detail, and the way that the ‘Procurement and Spend - Employee Spend’ joins the employee name and approver name to the business area fields maybe something that you can review as a solution.
I am hoping that you can come up with a number of solutions which we can then explore in further detail.
The key subject area that we would like this business area detail to be available in is the ‘Financials - AP Transactions’ area but if would certainly be beneficial to have in the ‘Procurement and Spend - Purchase Orders’ and ‘Procurement and Spend - Purchase Requisitions’ subject areas as well if it is feasible.
Can any plz.. guide the possible soultions we can do with this CR
Edited by: user13050518 on May 11, 2010 7:40 AMBonjour,
Je suppose vu votre prénom que vous parlez français lol bien que l'anglais ne me pose pas de problème.
En fait, il s'agit de plusieurs factures (avec différentes business area) pour un même fournisseur.
Au moment de la F110, le système comptabilise le paiement via une seule pièce mais avec plusieurs postes (un par business area) et la contrepartie le compte banque.
La case n'est pas cochée pour le champ T001-XGSBE donc je ne pense pqs que le problème provienne de là.
Cdlt -
Deletion of the Purchase order at the item level and header level
Hi Gurus,
We are using SRM 7.0 system.
In standard SRM 7.0, the PO can be deleted at header level and at line item level. I need to know the differnce between these deletions. I found that if the PO is deleted at the line item level the deletion indicator (DEL_IND) field in BBP_PDIGP table is 'X'.
But i could not find any clue to find the PO which is deleted at the header level. I need to code this logic in a report .
Kindly provide your valuable inputs.
Thanks,
RKThere are two ways:
1. From the Header by clicking the DELETE button. And this is only possible when the PO is not yet output to Vendor.
2. The second way is to delete all the items in the PO. This is possible any time irrespective of the output sent to the vendor. But provided if there are no follow-on documents for this.
Some times we could see the Deletion icon active in Header , it is because there is change version existing.
When a PO is created and ordered, this is the first version of the PO. And this PO is sent to the backend and output is sent to
the vendor.
Now when you make a change and hold it, SRM creates the 2ndversion of this PO. Then when you delete this PO, SRM marks this 2nd
version of PO to closed. Also you receive the pop-op confirmation that PO was deleted at this point. However, this PO deletion is never sent to the backend and output is not sent to the vendor since this PO has never been ordered. This version is the Change Version. This is shown after the PO number field if you pay attention on the screen.
When you search for the PO, it will show you the ordered PO (No change version shown after the PO number). The system does not show you the deleted version which is version 2. That is why you see status is 'ordered'. -
How to delete approved shopping carts at header level in SRM 5 ?
Hi All
We are using SRM 5 (Classic Scenario) and we have a requirement in which we need to delete the approved shopping carts at header level. Here we are referring the case where SC lies in approved state in SRM but no PO generated in back end.
We assume that if PO has been created for SC then shopping cart can not be deleted at all.
I have seen advices like deleting approved shopping carts at item level but this would not suffice. As well we have seen that if we delete the SC at item level still SC shows complete value in header.
Please advise on this.
Regards
Pranay Gupta
+919711120111Hello,
As far as I know, cart can be deleted at header level when its status is held.
You can try to archive your carts, since item can be deleted.
Check the archiving criteria here:
http://help.sap.com/saphelp_srm50/helpdata/en/3c/f8f03bb8e88109e10000000a11402f/frameset.htm
And shopping cart archiving procedure here:
http://wiki.sdn.sap.com/wiki/display/SRM/ShoppingCartArchiving
Regards,
Ricardo -
Deletion of Accounting view at Header level
How can I delete only Accounting view at Header level ??? i.e Valuation type is blank .
WHY? just to have a nice looking material master?
It is not possible to delete views. It is only possible to delete organisation levels.
So your possible way would be to set deletion indicator at plant level.
Then you would need to archive this material master in SARA object MM_MATNR
There are numerous preconditions for archiving, e.g. no stock in last 2 years
After a successful archiving, you can then create the plant level without accounting view again.
Edited by: Jürgen L. on Jun 5, 2009 9:33 AM -
Creating multiple partner function for a sale order @ header level
Hi All,
I have a requirement where in i have to create more than one partner funtion for a sale order @ header level. But the system did not allow this sort of scenario and i got the error,
Partner function ZZ can only occur 1 times in procedure TA (Sales Document Header)
the function module that was giving this error was SD_PCHECK_PARVW_COUNT_OK
here the function module checks if a partner function already exists if so it throws that error. This also updates the VBPA table where partner function is one of the key fields.
Our issue is that we have to allow the system to enable posting 2 or more partner function for the same sale order. It was also verified that the unique key was unchecked during configuration.
is there any other way of over coming this issue as we are updating the standard table. Is it possible??
Thanks a lot in advance for your reply....I believe this is a configuration setting, based upon the details of your post. Typically, a sales order can have multiple partner functions, but usually the partner type is not duplicated at a single level (header or one item). For example, it would not be logical to have multiple ship-to partners at the header level...these would be unique at the item level, if required.
Speak to your SD functional specialist about the configuration controls for partners, if you must have more than one partner with parvw = ZZ, for the entire order (header level).
Edited by: DaveL on Aug 23, 2011 3:00 PM -
Heading level hierarchy errors when topics are in TOC more than once
I have discovered that the hierarchy in the Heading levels in
the Printed Documentation will differ from than in my online help
table of contents hierarchy, and that the problem is due to topics
that are intentionally in the TOC more than once.
For example, in chapter 5 of a particular help system the
hierarchy should be:
Heading 1 < Chapter 5 title from top-level book>
Heading 2 <title of second level book>
Heading 3 <title of topic that appears under second-level
book>*
What I actually get is:
Heading 1 < Chapter title from top-level book>
Heading 2 <title of second level book>
Heading 4 <title of topic that appears under second-level
book>*
* This same topic appeared in an earlier chapter. In that
chapter it was really at a Heading 4 level.
Due to company styles, etc. we use a numbering system at the
headings and in the TOC, so instead of
5
5.1
5.1.1
I erroneously get
5
5.1
5.1.1.1
This type of hierarchy issue appears multiple times in this
particular document (which I inherited by the way.)
Other than restructuring the document to not reuse topics in
different places in the TOC, is there a solution or a workaround
for this problem?
What I am doing so far, is generating the Print Documentation
one chapter at a time. As long as a topic is not reused with the
same chapter, my hierarchy of heading levels is maintained;
otherwise, it is not. Then I can put the chapters back together
after fixing the few places that still have heading level problems.
This however, will be quite cumbersome as this document is
translated into nine other languages.
I am using RoboHelp X5 for Word / Word 2003 for the source
and most of the translations; RoboHelp Asian Edition, Simplified
Chinese / Word 2003 for the Chinese translation. The heading level
hierarchy error occurs in both versions.>> AF: I've commented in sections...
Without Maintain Heading Levels, RH will apply heading levels
to the books and then the topic levels will get bumped down. So a
top level book will be Heading 1 and the Headings in the topic will
get bumped down to 2, 3 and 4 etc. If then you have another book
one level down so that it gets Heading 2 applied, the same topic
but under the level two book would then get 3, 4 and 5 applied.
That is not the original problem but hopefully we are agreed
that is how things work on that.
>> Yes - that is the expected behavior. When it didn't
happen as expected, that's what led me to the discovery of the
cause of the problem (topic reuse).
Your problem was that firstly Heading 3 got bumped to Heading
4 if the same topic was inserted into the TOC twice. I assume it
was OK in the first instance, or is it that when you add it twice
it goes wrong everywhere?
>> Your assumption is correct. First occurrence is
correct. Second, third, and fourth (yes - there is one topic that
is used 4 times! ) are not correct based on TOC hierarchy.
On the numbering, nothing surprises me. If you look at my
site you will see that for RH HTML, i gave up on getting it right.
I have had many queries on this and more than a few people have
indicated they will work on the problem and get it working. I'm
still waiting. There are many posts about outline numbering
problems. Has anyone got it working satisfactorily?
>> I don't really have numbering problems. The
numbering is following the RoboHelp-generated hierarchy and the
.dot template that I apply. It's just that the RH-generated
hierarchy and its heading levels don't correspond to the "real"
hierarchy because of the reuse issue.
I have seen various Word gurus maintain that numbering has
not worked entirely satisfactorily since Word 2! Also enough posts
to convince me this is a Word issue, not a RH issue.
If you want to create a new project and knock something up
that demonstrates this problem, by all means zip it up and send it.
I'll assume it will be a small project and zip to less than 5mb. If
more, contact me first.
>> Unless you have RoboHelp X3 Asian Edition,
Simplified Chinese, there is really no need. I plan to either avoid
the reuse issue in the source, or build the print doc in sections
which is easy enough in RoboHelp X5 for the non-Chinese languages.
It is in the older Asian edition where the problems are compounded
by the omitted reuse topics. If you do have RoboHelp X3 Asian
Edition, Simplified Chinese and want to experiment, I can send you
a cut-down version of the project. Don't feel obligated though;
unless you can read Chinese (I can't) it is very tedious to work
with. -
How to manually delete Po at header level ?
Hi,
I can delete PO line items in my ECC60 system
However, i would like to delete PO at header level.
In EKKO , i can see the deletion flag in LOEKZ field.
BUT in ME22N, i cannot find any button to delete PO at header level...
Could somebody clarify the PO deletion at header level and the LOEKZ deletion flag in EKKO ?
Kind regards,
YannYann,
To my knowledge you cannot directly delete PO from the system. You need to follow the archiving steps...
1. Program: RM06EV47 - For setting Deletion Indicator
2. Program: RM06EW47 - For archiving the document.
3. Program: RM06ED47 - For Deletion from the system.
If you need further details you can go through this link <a href="http://help.sap.com/saphelp_47x200/helpdata/en/8d/3e4b63462a11d189000000e8323d3a/frameset.htm">Archiving Purchase documents</a>
Hope this helps....Reward your points and close the thread if so,
Regards,
Prasobh -
Conditions on RFQ Header are not changeable at PO Header level
Dear Gurus,
I have maintained a Quotation and enter the conditions on Header level in Quotation. Once i adopt the Quotation in Purchase Order, these conditions are displayed both at Item and Header level and i cannot edit the condition value at PO Header level, they are editable at Item level but not at header level.
I want to edit them at PO Header level too.
Please advise.
Johi KapoorHi,
If that is item condition then you can not change it at header level
check in M/06 make it at header level in change which can be made tab
Regards
Kailas Ugale
Maybe you are looking for
-
How do you set your own ringtones on an iPhone 6?
I used to own an iPhone 4s and I had no problem making ringtones and transferring them to be used on the phone. However I just cant seem to work out how to get them to show up on my new iPhone 6 when choosing ringtones I have made. I have renamed the
-
Length parameter in adapter module
Hello, With sender J2EE JMS adapter i configured flat to xml conversion with localejbs/AF_Modules/MessageTransformBean. For parameter xml.fieldNames I have 35 fieldnames and the length of the value of the parameter becomes 347. However it seems that
-
Hi all, I have an ESB process with an FTP adapter which I'm using to download files from the FTP to my local File System. I've been running this process with out problems but suddenly, today I'm not downloading all the files from the FTP. I found thi
-
Just bought a new iMac- where to download Photoshop CS6
I'm a CC annual subscriber (or whatever they call it- I pay monthly for Adobe) and I just purchased a new iMac. I'm trying to setup everything (migration assistant didn't work). Where do I download Photoshop CS6?
-
Dreamweaver CS4 crashing at start up on mac
Dreamweaver CS4 crashing at start up on mac. I have a macbook pro with 10.4.11. Just installed CS4 design premium and dreamweaver crashes when I try to launch. What's the fix?