|
How to mass deleting/closing of open/partially completed
quotations?
There was a request raise by user to help them closed all the old sales quotations that was not required anymore. This customize ABAP program was written to close all the open/partial quotations. REPORT ZRPT_SD_001. tables : vbak, vbuk, vbup. *----------------------------------------------------------------------*
selection-screen begin of block b1 with frame title text-001. parameters : p_abgru like vbap-abgru obligatory. select-options : S_vbeln for
vbuk-vbeln,
selection-screen end of block b1. *----------------------------------------------------------------------*
types : begin of t_tab,
data: it_tab type standard table of t_tab,
data: flag_end. * BAPI Declaration data: HEADER_INX type BAPISDH1X,
*----------------------------------------------------------------------*
start-of-selection. * Get All Open Quotations select vbup~vbeln vbup~posnr
loop at it_tab into wa_tab. HEADER_INX-UPDATEFLAG = 'U'.
append item_in. item_inx-ITM_NUMBER = wa_tab-posnr.
append item_inx. at end of vbeln. FLAG_END = 'X'. CALL FUNCTION 'BAPI_CUSTOMERQUOTATION_CHANGE'
read table return with key type = 'E'. if sy-subrc <> 0.
if flag_end eq 'X'.
modify it_tab from wa_tab.
endloop. end-of-selection. uline. write:/ sy-vline , (15)'Quotation.No' centered,
loop at it_tab into wa_tab. write:/ sy-vline , (15)wa_tab-vbeln centered,
at end of vbeln.
endloop. *-- End of Program |
|
See Also
Get help for your ABAP problems
ABAP Books
More ABAP Tips
SAP ERP Modules, Basis, ABAP and Other IMG Stuff All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|