Absolute Header Discount for Purchase Orders
Hi SAP Gurus,
Good day!
The scenario that I am testing is that I want to apply an absolute discount of USD1000 for a purchase order having 3 line items. When I use the available standard absolute header condition types and indicate the said amount, the system allocates USD1000 to each of the PO items. If that would be the case, then I have to enter USD1000/3 as header discount so that I can get the whole USD1000...Is there any other way so that I can just enter the whole amount without having to divide it by the number of PO
line items? Is there a setting that I need to consider in the condition type? Or is this really the way that SAP designed the condition types to behave? would you happen to know the governing reason why?
Also, I would appreciate it if you can provide me with some in depth training material regarding pricing procedures. The discussion on the standard MM course only briefly discusses the governing concepts.
Your immediate response is highly appreciated.
Best regards,
Pugna
go to M/06...here in your absolute discount condition type check whether it is maintained as calculation type Fixed amount or not...if not then maintain it....it will automatically distribute
Otherwise
Check whether it is Header condition or Item condition...if item condition is not ticked then tick it....other wise you can create a new condition type also with item condition tick and maintain the same in your pricing procedure in M/08...
Now while processing PO enter the respective absolute discount amount in each line item rather than in the header condition tab...
Check http://wiki.sdn.sap.com/wiki/display/stage/MM-PRICINGUSINGCALCULATION+SCHEMA for pricing procedure..
Regards,
Indranil
Similar Messages
-
Header Condition for Purchase Order Services
Hi All,
It´s possible to add a header/item condition at service level, that will be charged in total at the first service entry sheet for that service?
Thanks in advance,
Tiago FerreiraHello Tiago,
As per note 353482 it is possible to maintain header condition on the SERVICE OUTLINE LEVEL.
This note explains what condition types are available.
Best regards,
Eduardo Junior -
Use Word Editor for purchase order header text
Dear community!
Currently in our system when we create purchase order header text we are using the standard sap text editor.
I saw another system where they are using some kind of microsoft word editor plug in to create purchase order header texts and purchase order item texts.
I would like to figure out how I can activate this editor in the system.
Any help is appreciated - full points will be rewarded
Thanks & regards
AlexHi,
I tried to do that....
but we are on SAP_BASIS 701 / 0008 / SAPKB70108
when i start the report I get the message:
MS Word is a default editor now. Please read SAP Note 742662.
hints??? -
PO 'No goods receipt possible for purchase order'
Hi gurus!
While trying to make Confirmation of a PO in the SRM Portal the user is getting the error 'No goods receipt possible for purchase order'
The scenario used is Classic, so PO is replicated directly to the R/3 system.
Any idea why this is happening?
Thanks a lot!Hi, thanks for the quick reply!
Where i can check the Item category?
I found a field called 'subitem category' but it's blank
with this possible values:
1 Variant
2 Discount in kind: inclusive bonus qty.
3 Empties
4 Discount in kind: exclusive bonus qty.
5 Prepack item
6 Display item
7 Set item
8 Interchangeable items (IBU: A&D)
9 Pre-packing (SLS items)
H GT Bill of Material, Header Relevant
I GT Bill of Material, Item Relevant
About PO type i think it's EC (doc_type?), in R/3 is shown as EBP PO
I checked in backend system, in the item details > Delivery and the 'Goods Receipt' is checked. -
Open items for purchase order its very urgent
hi
my requirement is to write extract program for purchase order(me21) to extract only open items.
please provide sample code its very urgent.
thanks in advance.
points will be rewarded.
thanks
hari prasad reddycheck the below report :
REPORT ZMM_OPEN_PO_REPORT no standard page heading
line-size 255
message-id zwave.
======================================================================
Program Name : ZMM_OPEN_PO_REPORT *
Description : This report displays all Open PO Items and output *
would be PO Number,Material number and so on *
Author : Seshu *
Date : 01/24/2007 *
MODIFICATION HISTORY *
DATE | AUTHOR | CHANGE # | DESCRIPTION OF MODIFICATION *
--|||--
01/24/07| Seshu | DEVK921979 | Initial *
D A T A D E C L A R A T I O N P A R T ***
type-pools
type-pools : slis.
Tables
tables : ekko, " Purchase order Header
ekpo, " Purchase order Item
marc. " Material with Plant data
Internal table for output.
data : begin of i_output occurs 0,
ebeln like ekko-ebeln,
matnr like ekpo-matnr,
end of i_output.
ALV Data declaration.
data : v_repid like sy-repid.
ALV Function Module Variables
DATA: gs_layout type slis_layout_alv,
g_exit_caused_by_caller,
gs_exit_caused_by_user type slis_exit_by_user.
DATA: gt_fieldcat type slis_t_fieldcat_alv,
gs_print type slis_print_alv,
gt_events type slis_t_event,
gt_list_top_of_page type slis_t_listheader,
g_status_set type slis_formname value 'PF_STATUS_SET',
g_user_command type slis_formname value 'USER_COMMAND',
g_top_of_page type slis_formname value 'TOP_OF_PAGE',
g_top_of_list type slis_formname value 'TOP_OF_LIST',
g_end_of_list type slis_formname value 'END_OF_LIST',
g_variant LIKE disvariant,
g_save(1) TYPE c,
g_tabname_header TYPE slis_tabname,
g_tabname_item TYPE slis_tabname,
g_exit(1) TYPE c,
gx_variant LIKE disvariant.
data : gr_layout_bck type slis_layout_alv.
Ranges
ranges r_eindt for eket-eindt.
initialization.
v_repid = sy-repid.
start-of-selection.
Get the data from EKKO ,EKPO and MARC Table
perform get_data_tables.
end-of-selection.
display the data in the form of ALV
perform display_data.
*& Form get_data_tables
Get the data from EKKO,EKPO and MARC Table
FORM get_data_tables.
clear : i_output.
refresh : i_output.
fill the dates in ranges
r_eindt-low = sy-datum - 7.
r_eindt-high = sy-datum + 14.
r_eindt-option = 'BT'.
r_eindt-sign = 'I'.
append r_eindt.
Get the data from EKKO,EKPO and EKET Tables
select aebeln bmatnr into table i_output
from ekko as a inner join
ekpo as b on aebeln = bebeln
inner join marc as c on cmatnr = bmatnr
inner join mara as d on dmatnr = bmatnr
inner join eket as e on eebeln = aebeln
and eebelp = bebelp
where c~beskz = 'E'
and c~werks = '1000'
and d~mtart = 'FERT'
and b~loekz = space
and b~elikz = space
and e~eindt in r_eindt.
if sy-subrc ne 0.
message e000(zwave) with 'No open purchase order found'.
endif.
ENDFORM. " get_data_tables
*& Form display_data
text
FORM display_data.
Fill the Fiedlcat
PERFORM fieldcat_init using gt_fieldcat[].
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = g_user_command
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = gr_layout_bck
IT_FIELDCAT = gt_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = g_save
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = i_output
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
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. " display_data
*& Form fieldcat_init
text
-->P_GT_FIELDCAT[] text
FORM fieldcat_init USING e01_lt_fieldcat type slis_t_fieldcat_alv.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
Purchase order number
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'EBELN'.
LS_FIELDCAT-ref_fieldname = 'EBELN'.
LS_FIELDCAT-ref_tabname = 'EKKO'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
ls_fieldcat-seltext_L = 'Purchase Order'.
ls_fieldcat-seltext_M = 'Purchase Order'.
ls_fieldcat-seltext_S = 'Purchase Order'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Material #
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MATNR'.
LS_FIELDCAT-ref_fieldname = 'MATNR'.
LS_FIELDCAT-ref_tabname = 'EKPO'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
ls_fieldcat-seltext_L = 'Material'.
ls_fieldcat-seltext_M = 'Material'.
ls_fieldcat-seltext_S = 'Material'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
ENDFORM. " fieldcat_init -
Use of SAVE_TEXT in customer exits / BADI for purchase order
Hi All,
I am trying to save some long text by using SAVE_TEXT function module in a badi implementation for purchase order header text. The same is working fine if i try to update the PO header text via a report. But if i try using badi (the code is written in a PAI event for the BADI), then though the text transfer and save is successful during the code excution, but for the first time when i add any text its not visible in ME22N tcode. Since its an online event. But when i double click on that editor and the sap script editor gets opened. then i press back button, the text is appearing on the same small screen edtor . after this any number of time i edit or delete text, the save_text function module works fine.
My issue is why for the first time always i have to double click on the editor to open the sap script editor. I have also included commit_text in this case after save_text FM.
the requirement here goes like this. in one tab for PO header the user will enter some number (This is a customizing screen implemented through badi.) and the corresponsing discription should appear when user clicks on text tab in po header screen (me21n / me22n).
Kindly help.
Thanks
MamataHi mamata rath
I have solve the problem which similar to yours. the code which is as the following
DATA: textline TYPE tdline,
name TYPE c LENGTH 70,
glines TYPE TABLE OF tline,
gline LIKE LINE OF glines,
ls_header TYPE thead.
CONCATENATE ch_eban-banfn ch_eban-bnfpo INTO name.
ls_header-tdobject = 'EBAN'.
ls_header-tdname = name.
ls_header-tdid = 'B01'.
ls_header-tdspras = sy-langu.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
* CLIENT = SY-MANDT
header = ls_header
* INSERT = ' '
* SAVEMODE_DIRECT = ' '
* OWNER_SPECIFIED = ' '
* LOCAL_CAT = ' '
* IMPORTING
* FUNCTION =
* NEWHEADER =
tables
lines = glines
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
IF sy-subrc = 0.
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
OBJECT = 'EBAN'
NAME = name
* ID = '*'
* LANGUAGE = '*'
* SAVEMODE_DIRECT = ' '
* KEEP = ' '
* LOCAL_CAT = ' '
* IMPORTING
* COMMIT_COUNT =
* TABLES
* T_OBJECT =
* T_NAME =
* T_ID =
* T_LANGUAGE =
ENDIF. -
Call BAPI_GOODSMVT_CREATE to create a goods receipt for purchase order
Hi,
I'm calling the bapi BAPI_GOODSMVT_CREATE to create a goods receipt for purchase order, but the following code doesn't work. It doesn't give me any kind of error message but it does nothing as well...
Can anyone help me please?
Thank You
Hugo
Code
DATA: wa_goodsmvt_header LIKE bapi2017_gm_head_01,
wa_goodsmvt_code LIKE bapi2017_gm_code,
wa_bapi2017_gm_head TYPE bapi2017_gm_head_ret-mat_doc.
DATA: it_goodsmvt_item LIKE bapi2017_gm_item_create OCCURS 0 WITH HEADER LINE,
it_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
wa_goodsmvt_header-pstng_date = SY-DATUM.
wa_goodsmvt_header-doc_date = SY-DATUM.
wa_goodsmvt_header-ref_doc_no = '4500000020'.
wa_goodsmvt_code-gm_code = '01'. "Goods receipt for purchase Order
it_goodsmvt_item-stge_loc = 'BPF2'.
it_goodsmvt_item-move_type = '101' .
it_goodsmvt_item-entry_qnt = 17.
it_goodsmvt_item-entry_uom = 'KG'.
it_goodsmvt_item-mvt_ind = 'B'.
it_goodsmvt_item-po_number = '4500000020'.
it_goodsmvt_item-po_item = '00010'.
it_goodsmvt_item-material = '50'.
APPEND it_goodsmvt_item.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = wa_goodsmvt_header
goodsmvt_code = wa_goodsmvt_code
IMPORTING
materialdocument = wa_bapi2017_gm_head
TABLES
goodsmvt_item = it_goodsmvt_item
return = it_return.
data: begin of errmsg occurs 10.
include structure bapiret2.
data: end of errmsg.
data: wmenge like iseg-menge,
errflag.
clear errflag.
loop at errmsg.
if errmsg-type eq 'E'.
write:/'Error in function', errmsg-message.
errflag = 'X'.
else.
write:/ errmsg-message.
endif.
endloop.
if errflag is initial.
commit work and wait.
if sy-subrc ne 0.
write:/ 'Error in updating'.
exit.
else.
write:/ 'Ok'.
endif.
endif.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = ' '.Hi,
Thank you for the asnwer! I'm a rookie at ABAP so please forgive my stupid questions
I've changed the code to:
DATA: wa_goodsmvt_header LIKE bapi2017_gm_head_01,
wa_goodsmvt_code LIKE bapi2017_gm_code,
wa_bapi2017_gm_head TYPE bapi2017_gm_head_ret-mat_doc.
DATA: it_goodsmvt_item LIKE bapi2017_gm_item_create OCCURS 0 WITH HEADER LINE,
it_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
wa_goodsmvt_header-pstng_date = SY-DATUM.
wa_goodsmvt_header-doc_date = SY-DATUM.
wa_goodsmvt_header-ref_doc_no = '4500000020'.
wa_goodsmvt_code-gm_code = '01'. "Goods receipt for purchase Order
it_goodsmvt_item-plant = 'BP01'.
it_goodsmvt_item-stge_loc = 'BPF2'.
it_goodsmvt_item-move_type = '101' .
it_goodsmvt_item-entry_qnt = 10.
it_goodsmvt_item-entry_uom = 'KG'.
it_goodsmvt_item-mvt_ind = 'B'.
it_goodsmvt_item-po_number = '4500000020'.
it_goodsmvt_item-po_item = '10'.
it_goodsmvt_item-material = '50'.
APPEND it_goodsmvt_item.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = wa_goodsmvt_header
goodsmvt_code = wa_goodsmvt_code
IMPORTING
materialdocument = wa_bapi2017_gm_head
TABLES
goodsmvt_item = it_goodsmvt_item
return = it_return.
write:/ it_return-message.
And the return message is : Material document data and PO data do not match (Material)
Any idea of what might be the problem?
Thanks -
Goods Receipts for Purchase Order using BAPI_GOODSMVT_CREAT
Hi experts,
I am working on the a program where am generating Goods Receipts for Purchase Order. the BAPI_GOODSMVT_CREAT returns an error saying "Material 6003022 not maintained in plant 1001"
Can any one assist? is there a field I may be missing?
Here is a sample code.
DATA: gm_header TYPE bapi2017_gm_head_01.
DATA: gm_code TYPE bapi2017_gm_code.
DATA: gm_headret TYPE bapi2017_gm_head_ret.
DATA: gm_item TYPE TABLE OF bapi2017_gm_item_create WITH HEADER LINE.
DATA: gm_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: gm_retmtd TYPE bapi2017_gm_head_ret-mat_doc.
CLEAR: gm_return, gm_retmtd.
REFRESH gm_return.
Setup BAPI header
"data
gm_header-pstng_date = sy-datum.
gm_header-doc_date = sy-datum.
gm_code-gm_code = '02'.
" MB1A * Write 971 movement to table CLEAR GM_ITEM.
MOVE '101' TO gm_item-move_type .
" MOVE 'Q' TO GM_ITEM-SPEC_STOCK.
MOVE '6003022' TO gm_item-material.
MOVE '10' TO gm_item-entry_qnt.
MOVE 'EA' TO gm_item-entry_uom.
MOVE '1001' TO gm_item-plant.
MOVE '' TO gm_item-stge_loc.
MOVE '0901' TO gm_item-move_reas.
" MOVE '4500006877' TO GM_ITEM-WBS_ELEM.
" MOVE '0020' TO GM_ITEM-VAL_WBS_ELEM.
MOVE '0020' TO gm_item-deliv_numb.
MOVE '4500006881' TO gm_item-po_number.
MOVE '0010' TO gm_item-po_item.
APPEND gm_item.
Call goods movement BAPI
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = gm_header
goodsmvt_code = gm_code
IMPORTING
goodsmvt_headret = gm_headret
materialdocument = gm_retmtd
TABLES
goodsmvt_item = gm_item
return = gm_return.
IF NOT gm_retmtd IS INITIAL.
COMMIT WORK AND WAIT.
CALL FUNCTION 'DEQUEUE_ALL'.
ELSE.
COMMIT WORK AND WAIT.
CALL FUNCTION 'DEQUEUE_ALL'.
ENDIF.>
Spark842 wrote:
> Hi experts,
> I am working on the a program where am generating Goods Receipts for Purchase Order. the BAPI_GOODSMVT_CREAT returns an error saying "Material 6003022 not maintained in plant 1001"
> Can any one assist? is there a field I may be missing?
>
> Here is a sample code.
>
> DATA: gm_header TYPE bapi2017_gm_head_01.
> DATA: gm_code TYPE bapi2017_gm_code.
> DATA: gm_headret TYPE bapi2017_gm_head_ret.
> DATA: gm_item TYPE TABLE OF bapi2017_gm_item_create WITH HEADER LINE.
> DATA: gm_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE.
> DATA: gm_retmtd TYPE bapi2017_gm_head_ret-mat_doc.
> CLEAR: gm_return, gm_retmtd.
> REFRESH gm_return.
> * Setup BAPI header
> "data
> gm_header-pstng_date = sy-datum.
> gm_header-doc_date = sy-datum.
> gm_code-gm_code = '02'.
>
>
> " MB1A * Write 971 movement to table CLEAR GM_ITEM.
> MOVE '101' TO gm_item-move_type .
> " MOVE 'Q' TO GM_ITEM-SPEC_STOCK.
> MOVE '6003022' TO gm_item-material.
> MOVE '10' TO gm_item-entry_qnt.
> MOVE 'EA' TO gm_item-entry_uom.
> MOVE '1001' TO gm_item-plant.
> MOVE '' TO gm_item-stge_loc.
> MOVE '0901' TO gm_item-move_reas.
> " MOVE '4500006877' TO GM_ITEM-WBS_ELEM.
> " MOVE '0020' TO GM_ITEM-VAL_WBS_ELEM.
> MOVE '0020' TO gm_item-deliv_numb.
> MOVE '4500006881' TO gm_item-po_number.
> MOVE '0010' TO gm_item-po_item.
> APPEND gm_item.
>
> * Call goods movement BAPI
>
> CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
> EXPORTING
> goodsmvt_header = gm_header
> goodsmvt_code = gm_code
> IMPORTING
> goodsmvt_headret = gm_headret
> materialdocument = gm_retmtd
> TABLES
> goodsmvt_item = gm_item
> return = gm_return.
>
> IF NOT gm_retmtd IS INITIAL.
>
> COMMIT WORK AND WAIT.
> CALL FUNCTION 'DEQUEUE_ALL'.
> ELSE.
> COMMIT WORK AND WAIT.
>
> CALL FUNCTION 'DEQUEUE_ALL'.
> ENDIF.
My guess, is that this material is not really maintained in the Plant '1001', to be on the safer side, get the exact values from EKPO itself, also check if this material exists in the table MARC for the plant and storage location.
MOVE '1001' TO gm_item-plant. "<< Hard coded
MOVE '' TO gm_item-stge_loc.
Replace the above hardcodes to something like this to get the actual value from EKPO.
select werks lgort into (gm_item-plant, gm_item-stge_loc) from ekpo
where ebeln = gm_item-po_number
and ebelp = gm_item-po_item. -
Getting errors when iam using BAPI_PO_CREATE1 for Purchase Order creation
Hi sap Gurus,
I am getting Errors when iam using BAPI_PO_CREATE1 for Purchase Order creation that Material (144) does not exist but it is alreardy maintained in MM01.
I dont get how it is coming.and what are the mandatory fields in bapi BAPI_PO_CREATE1 in item level .that is too material only.
pls let me know .
thanks in advance.Hi,
Check the sample code..
report zpo_test .
*DATA DECLARATION
constants : c_x value 'X'.
*Structures to hold PO header data
data : header like bapimepoheader ,
headerx like bapimepoheaderx .
*Structures to hold PO account data
data : account like bapimepoaccount occurs 0 with header line ,
accountx like bapimepoaccountx occurs 0 with header line .
*Internal Tables to hold PO ITEM DATA
data : item like bapimepoitem occurs 0 with header line,
itemx like bapimepoitemx occurs 0 with header line,
*Internal table to hold messages from BAPI call
return like bapiret2 occurs 0 with header line,
*Internal table to hold messages from BAPI call
pocontractlimits like bapiesucc occurs 0 with header line.
data : w_header(40) value 'PO Header',
purchaseorder like bapimepoheader-po_number,
delivery_date like bapimeposchedule-delivery_date.
data : ws_langu like sy-langu.
*text-001 = 'PO Header' - define as text element
selection-screen begin of block b1 with frame title text-001.
parameters : company like header-comp_code default '122' ,
doctyp like header-doc_type default 'NB' ,
cdate like header-creat_date default sy-datum ,
vendor like header-vendor default '2000000012' ,
pur_org like header-purch_org default 'PU01' ,
pur_grp like header-pur_group default '005' .
*sociedad like HEADER-COMP_CODE default '122' ,
*vendedor like HEADER-SALES_PERS default 'sale person'.
selection-screen end of block b1.
selection-screen begin of block b2 with frame title text-002.
parameters : item_num like item-po_item default '00010',
material like item-material default '12000000' ,
tipo_imp like item-acctasscat default 'K' ,
*pos_doc like ITEM-ITEM_CAT default 'F' ,
shorttxt like item-short_text default 'PRUEBA BAPI' ,
grup_art like item-matl_group default '817230000' ,
plant like item-plant default '3001' ,
mpe like item-trackingno default '9999' ,
*contrato like ITEM-AGREEMENT default '4904000003' ,
*quantity like ITEM-QUANTITY default 1 .
po_unit like item-po_unit default 'EA'.
selection-screen end of block b2.
Par?mnetros de imputaci?n
selection-screen begin of block b3 with frame title text-004.
parameters : centro like account-costcenter default '1220813150',
cuenta like account-gl_account default '6631400' ,
num_pos like account-po_item default '10' ,
serial like account-serial_no default '01' ,
ind_imp like account-tax_code default 'I2' .
selection-screen end of block b3.
start-of-selection.
*DATA POPULATION
ws_langu = sy-langu. "Language variable
*POPULATE HEADER DATA FOR PO
*HEADER-COMP_CODE = sociedad .
header-doc_type = doctyp .
header-vendor = vendor .
header-creat_date = cdate .
header-created_by = 'TD17191' .
header-purch_org = pur_org .
header-pur_group = pur_grp .
header-comp_code = company .
header-langu = ws_langu .
*HEADER-SALES_PERS = vendedor .
*HEADER-CURRENCY = 'DOP' .
*HEADER-ITEM_INTVL = 10 .
*HEADER-PMNTTRMS = 'N30' .
*HEADER-EXCH_RATE = 1 .
*POPULATE HEADER FLAG.
headerx-comp_code = c_x.
headerx-doc_type = c_x.
headerx-vendor = c_x.
headerx-creat_date = c_x.
headerx-created_by = c_x.
headerx-purch_org = c_x.
headerx-pur_group = c_x.
headerx-langu = c_x.
*HEADERX-sales_pers = c_x.
*HEADERX-CURRENCY = c_x.
*HEADER-ITEM_INTVL = c_x.
*HEADER-PMNTTRMS = c_x.
*HEADER-EXCH_RATE = c_x.
*HEADER-EXCH_RATE = c_x.
*POPULATE ITEM DATA.
item-po_item = item_num.
item-quantity = '1'.
*ITEM-MATERIAL = material .
item-short_text = 'prueba bapi_po_create1'.
*ITEM-TAX_CODE = ''.
item-acctasscat = 'K' .
*ITEM-ITEM_CAT = 'D' .
item-matl_group = '817230000' .
item-plant = '3001' .
item-trackingno = '99999'.
item-preq_name = 'test'.
*ITEM-AGREEMENT = '' .
*ITEM-AGMT_ITEM = ''.
item-quantity = '1' .
item-po_unit = 'EA'.
*ITEM-ORDERPR_UN = 'EA'.
item-conv_num1 = '1'.
item-conv_den1 = '1'.
item-net_price = '1000000' .
item-price_unit = '1'.
item-gr_pr_time = '0'.
item-prnt_price = 'X'.
item-unlimited_dlv = 'X'.
item-gr_ind = 'X' .
item-ir_ind = 'X' .
item-gr_basediv = 'X'.
*ITEM-PCKG_NO = '' .
append item. clear item.
*POPULATE ITEM FLAG TABLE
itemx-po_item = item_num.
itemx-po_itemx = c_x.
*ITEMX-MATERIAL = C_X.
itemx-short_text = c_x.
itemx-quantity = c_x.
*ITEMX-TAX_CODE = C_X.
itemx-acctasscat = c_x.
*ITEMX-ITEM_CAT = c_x.
itemx-matl_group = c_x.
itemx-plant = c_x.
itemx-trackingno = c_x.
itemx-preq_name = c_x.
*ITEMX-AGREEMENT = C_X.
*ITEMX-AGMT_ITEM = c_x.
itemx-stge_loc = c_x.
itemx-quantity = c_x.
itemx-po_unit = c_x.
*ITEMX-ORDERPR_UN = C_X.
itemx-conv_num1 = c_x.
itemx-conv_den1 = c_x.
itemx-net_price = c_x.
itemx-price_unit = c_x.
itemx-gr_pr_time = c_x.
itemx-prnt_price = c_x.
itemx-unlimited_dlv = c_x.
itemx-gr_ind = c_x .
itemx-ir_ind = c_x .
itemx-gr_basediv = c_x .
append itemx. clear itemx.
*POPULATE ACCOUNT DATA.
account-po_item = item_num.
account-serial_no = serial .
account-creat_date = sy-datum .
account-costcenter = centro .
account-gl_account = cuenta .
account-gr_rcpt = 'tester'.
append account. clear account.
*POPULATE ACCOUNT FLAG TABLE.
accountx-po_item = item_num .
accountx-po_itemx = c_x .
accountx-serial_no = serial .
accountx-serial_nox = c_x .
accountx-creat_date = c_x .
accountx-costcenter = c_x .
accountx-gl_account = c_x .
account-gr_rcpt = c_x.
append accountx. clear accountx.
*BAPI CALL
call function 'DIALOG_SET_NO_DIALOG'.
call function 'BAPI_PO_CREATE1'
exporting
poheader = header
poheaderx = headerx
importing
exppurchaseorder = purchaseorder
tables
return = return
poitem = item
poitemx = itemx
poaccount = account
poaccountx = accountx.
*Confirm the document creation by calling database COMMIT
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
IMPORTING
RETURN =
end-of-selection.
*Output the messages returned from BAPI call
loop at return.
write / return-message.
endloop.
Regards
Sudheer -
Pricing Procedure for Purchase Order
I have to pick item level conditions for value : bed , hr edu cess, edu cess, cst,lst.
I am trying to the pick up fields kbetr and kwert for following conditions from konv table but there are only header level conditons.
so How can i Proceed for this?
For Purchase order script i have used standard Program SAPFM06P.But this a subroutine Pool Program.hi
Write a Sub-routine in the form, where u can call all the pricing procedures.
write this in the form
/: PERFORM TAX_AMT IN PROGRAM ZMM_REP_POTAX
/: USING &EKPO-NETWR& .
/: CHANGING *xxx-xxx&
write a sub-routine in abap editor , calling the program name and calculating pricing procedures
regards
sailendra kolakaluri -
Table for parked and posted vendor bills for purchase order.
Gurus
In which table purchase order histroy data is stored? Is there any standard report for viewing following
po no,PO date,line item no.,material code,ordered quantity,GRN date,GRN qty,GRN amount,parked qty,parked amount,posted qty, posted amount.
Atul Kulkarni.Hi,
PO history could be seen from table EKBe.
Rest of the details can be seen in EKKO (header table for purchasing document) and EKKO (line item for purchasing doc).
Regards,
Ashwini. -
User Exit for Purchase Order Release Strategy
Hi,
I am a little new to this, how do I search for a user exit for purchase order release strategy (TCode ME29N).
Thanks in advance.
MickHi
Check the following Exits and BADI for Pur Requisition
Enhancement
MEVME001 WE default quantity calc. and over/ underdelivery tolerance
MM06E001 User exits for EDI inbound and outbound purchasing documents
MM06E003 Number range and document number
MM06E004 Control import data screens in purchase order
MM06E005 Customer fields in purchasing document
MM06E007 Change document for requisitions upon conversion into PO
MM06E008 Monitoring of contr. target value in case of release orders
MM06E009 Relevant texts for "Texts exist" indicator
MM06E010 Field selection for vendor address
MM06E011 Activate PReq Block
MMAL0001 ALE source list distribution: Outbound processing
MMAL0002 ALE source list distribution: Inbound processing
MMAL0003 ALE purcasing info record distribution: Outbound processing
MMAL0004 ALE purchasing info record distribution: Inbound processing
MMDA0001 Default delivery addresses
MMFAB001 User exit for generation of release order
MRFLB001 Control Items for Contract Release Order
AMPL0001 User subscreen for additional data on AMPL
LMEDR001 Enhancements to print program
LMELA002 Adopt batch no. from shipping notification when posting a GR
LMELA010 Inbound shipping notification: Transfer item data from IDOC
LMEQR001 User exit for source determination
LMEXF001 Conditions in Purchasing Documents Without Invoice Receipt
LWSUS001 Customer-Specific Source Determination in Retail
M06B0001 Role determination for purchase requisition release
M06B0002 Changes to comm. structure for purchase requisition release
M06B0003 Number range and document number
MEQUERY1 Enhancement to Document Overview ME21N/ME51N
MELAB001 Gen. forecast delivery schedules: Transfer schedule implem.
MEFLD004 Determine earliest delivery date f. check w. GR (only PO)
MEETA001 Define schedule line type (backlog, immed. req., preview)
ME590001 Grouping of requsitions for PO split in ME59
M06E0005 Role determination for release of purchasing documents
M06E0004 Changes to communication structure for release purch. doc.
M06B0005 Changes to comm. structure for overall release of requisn.
M06B0004 Number range and document number
Business Add-in
ME_PROCESS_REQ_CUST Enhancements for Processing Enjoy PReqs: Customer
ME_PROCESS_REQ Enhancements for Processing Enjoy PReqs: Internal
ME_PROCESS_PO_CUST Enhancements for Processing Enjoy Purchase Order: Customer
ME_PROCESS_PO Enhancements for Processing Enjoy Purchase Order: Intern.
ME_PROCESS_COMP Processing of Component Default Data at Time of GR: Custome
ME_PO_SC_SRV BAdI: Service Tab Page for Subcontracting
ME_PO_PRICING_CUST Enhancements to Price Determination: Customer
ME_PO_PRICING Enhancements to Price Determination: Internal
ME_INFOREC_SEND Capture/Send Purchase Info Record Changes - Internal Use
ME_HOLD_PO Hold Enjoy Purchase Orders: Activation/Deactivation
ME_GUI_PO_CUST Customer's Own Screens in Enjoy Purchase Order
ME_FIELDSTATUS_STOCK FM Account Assignment Behavior for Stock PR/PO
ME_DP_CLEARING Clearing (Offsetting) of Down Payments and Payment Requests
ME_PURCHDOC_POSTED Purchasing Document Posted
SMOD_MRFLB001 Control Items for Contract Release Order
EXTENSION_US_TAXES Extended Tax Calculation with Additional Data
ARC_MM_EKKO_WRITE BAdI: Enhancement of Scope of Archiving (MM_EKKO)
ARC_MM_EKKO_CHECK BAdI: Enhancement of Archivability Check (MM_EKKO)
MM_EDI_DESADV_IN Supplementation of Delivery Interface from Purchase Order
MM_DELIVERY_ADDR_SAP Determination of Delivery Address
ME_WRF_STD_DNG PO Controlling Reminder: Extension to Standard Reminder
ME_TRIGGER_ATP Triggers New ATP for Changes in EKKO, EKPO, EKPV
ME_TRF_RULE_CUST_OFF BADI for Deactivation of Field T161V-REVFE
ME_TAX_FROM_ADDRESS Tax jurisdiction code taken from address
ME_REQ_POSTED Purchase Requisition Posted
ME_REQ_OI_EXT Commitment Update in the Case of External Requisitions
ME_RELEASE_CREATE BAdI: Release Creation for Sched.Agrmts with Release Docu.
ME_DEFINE_CALCTYPE Control of Pricing Type: Additional Fields
ME_CHANGE_OUTTAB Enrich ALV Output Table in Purchasing
ME_CHANGE_CHARACTER Customer-Specific Characteristics for Product Allocation
ME_CCP_DEL_DURATION Calc. of Delivery Duration in CCP Process (Not in Standard)
ME_CCP_BESWK_AUTH_CH BAdI for authorization checks for procuring plant
ME_CCP_ACTIVE_CHECK BAdI to check whether CCP process is active
ME_BSART_DET Change document type for automatically generated POs
ME_BAPI_PR_CREATE_02
ME_BAPI_PR_CREATE_01
ME_BAPI_PO_CREATE_02
ME_BAPI_PO_CREATE_01
ME_BADI_DISPLAY_DOC BAdI for Internal Control of Transaction to be Invoked
ME_ACTV_CANCEL_PO BAdI for Activating the Cancel Function at Header Level
MEGUI_LAYOUT BAdI for Enjoy Purchasing GUI
ME_CHECK_ALL_ITEMS Run Through Items Again in the Event of Changes in EKKO
ME_COMMTMNT_REQ_RE_C Check of Commitment Relevance of Purchase Requisitions
ME_COMMTMNT_REQ_RELE Check of Commitment Relevance of Purchase Requisitions
ME_COMMTMNT_PO_REL_C Check for Commitment-Relevance of Purchase Orders
ME_COMMTMNT_PO_RELEV Check for Commitment-Relevance of Purchase Orders
ME_COMMITMENT_STO_CH BadI for checking if commitments for STOs are active
ME_COMMITMENT_RETURN Commitment for return item
ME_CIP_REF_CHAR Enables Reference Characteristics in Purchasing
ME_CIP_ALLOW_CHANGE Configuration in Purchasing: Changeability Control
ME_CIN_MM06EFKO Copy PO data for use by Country version India
ME_CIN_LEINRF2V BADI for LEINRF03 excise_invoice_details
ME_CIN_LEINRF2R BADI for CIN India - Delivery charges
ME_CHECK_SOURCES Additional Checks in Source Determination/Checking
ME_CHECK_OA Check BAdI for Contracts
Reward points if useful
Rgds,
Naren -
Version management for Purchase order
Dear Friends,
I am implimenting version management for Purchase orders.
Under version management(IMG) ,set up change dispalys node--
following fields are available.
Ex:
Doc type-- ZCO,NB
For item view fields:
Field nameEMATN(material),TableMEPO1211--material field in Item over view
Field nameMENGE(Quantity),TableMEPO1211
For Header level fields:
Field nameZTERM(payment terms field),,TableMEPO1226
Category--A or B for selection of change documents
No out put--if i tick it concern field will not included in change doc
Version--what is the purpose
Please suggest me
1) we need enter the all the field names in the item over view and item details and Header level fields as given above ,is it correct.
2) And with regard to Table, do i enter for Header level fields-EKKO or MEPO1226 which is available in F1 under techinical information,
for item level fields,shall i enter table name-EKPO or MEPO1211as dispalyed in the F1 under techinical information.
3) I need to enter all the fields existing in the purchase order
4) All these fields and data is to be entered for every document type NB and ZCO.
5) After changes are made in Purchase order,first time on saving the PO,version is creating automatically,
second time,if we do changes, version is not creating on saving the purchase order,what configuration needs to be done.
Please suggest.
Regards,
MaganaAlso tell me the use of *Display of change documents in PO*.
It will display changes made both in item & header.It will help you to audit all changes made in p.o after it is raised.
In version management not all changes can be ameneded as seperate versions
only critical changes like price revision,quantity revision. -
User Exit/BADI for Purchase Order and Purchase Requisitions
HI,
I have a requireent where i have to check the the user does not enter both Subitems and Over a Limit for a Service Purchase Requisition.
Is there a User Exit or Badi that i can use where this information is availaible.
also i have to check that release strategy is assigned to every purchase order where the version has been completed.
Is there a User Exit or Badi where Information of EREV table is availaible.
Regards,
Tarun BahalFor Purchachase requisition , the BADIs and USER EXITS are
ME_COMMITMNT_PARKING BAdI for Redefining Commitment Interface When Parking
ME_MEREQ_PARKING BAdI Purchase Requisition: "Hold"
ME_REQ_HEADER_TEXT Copy Header Text: Enjoy Purchase Requisition
try with the above BADI's
MEREQ001 Customers' Own Data in Purchase Requisition
for Purchase order , the BADIs and USER EXITS are
ARC_MM_EKKO_CHECK BAdI: Enhancement of Archivability Check (MM_EKKO)
ARC_MM_EKKO_WRITE BAdI: Enhancement of Scope of Archiving (MM_EKKO)
EXTENSION_US_TAXES Extended Tax Calculation with Additional Data
MEGUI_LAYOUT BAdI for Enjoy Purchasing GUI
ME_ACTV_CANCEL_PO BAdI for Activating the Cancel Function at Header Level
ME_BADI_DISPLAY_DOC BAdI for Internal Control of Transaction to be Invoked
ME_BAPI_PO_CREATE_01
ME_BAPI_PO_CREATE_02
ME_BAPI_PR_CREATE_01
ME_BAPI_PR_CREATE_02
ME_BSART_DET Change document type for automatically generated POs
ME_CCP_ACTIVE_CHECK BAdI to check whether CCP process is active
ME_CCP_BESWK_AUTH_CH BAdI for authorization checks for procuring plant
ME_CCP_DEL_DURATION Calc. of Delivery Duration in CCP Process (Not in Standard)
ME_CHANGE_CHARACTER Customer-Specific Characteristics for Product Allocation
ME_CHANGE_OUTTAB Enrich ALV Output Table in Purchasing
ME_CHECK_ALL_ITEMS Run Through Items Again in the Event of Changes in EKKO
ME_CHECK_OA Check BAdI for Contracts
ME_CHECK_SOURCES Additional Checks in Source Determination/Checking
ME_CIN_LEINRF2R BADI for CIN India - Delivery charges
ME_CIN_LEINRF2V BADI for LEINRF03 excise_invoice_details
ME_CIN_MM06EFKO Copy PO data for use by Country version India
ME_CIP_ALLOW_CHANGE Configuration in Purchasing: Changeability Control
ME_CIP_REF_CHAR Enables Reference Characteristics in Purchasing
ME_COMMITMENT_RETURN Commitment for return item
ME_COMMITMENT_STO_CH BadI for checking if commitments for STOs are active
ME_COMMTMNT_PO_RELEV Check for Commitment-Relevance of Purchase Orders
ME_COMMTMNT_PO_REL_C Check for Commitment-Relevance of Purchase Orders
ME_COMMTMNT_REQ_RELE Check of Commitment Relevance of Purchase Requisitions
ME_COMMTMNT_REQ_RE_C Check of Commitment Relevance of Purchase Requisitions
ME_DEFINE_CALCTYPE Control of Pricing Type: Additional Fields
ME_DP_CLEARING Clearing (Offsetting) of Down Payments and Payment Requests
ME_FIELDSTATUS_STOCK FM Account Assignment Behavior for Stock PR/PO
ME_GUI_PO_CUST Customer's Own Screens in Enjoy Purchase Order
ME_HOLD_PO Hold Enjoy Purchase Orders: Activation/Deactivation
ME_INFOREC_SEND Capture/Send Purchase Info Record Changes - Internal Use
ME_PO_PRICING Enhancements to Price Determination: Internal
ME_PO_PRICING_CUST Enhancements to Price Determination: Customer
ME_PO_SC_SRV BAdI: Service Tab Page for Subcontracting
ME_PROCESS_COMP Processing of Component Default Data at Time of GR: Customer
ME_PROCESS_PO Enhancements for Processing Enjoy Purchase Order: Intern.
ME_PROCESS_PO_CUST Enhancements for Processing Enjoy Purchase Order: Customer
ME_PROCESS_REQ Enhancements for Processing Enjoy PReqs: Internal
ME_PROCESS_REQ_CUST Enhancements for Processing Enjoy PReqs: Customer
ME_PURCHDOC_POSTED Purchasing Document Posted
ME_RELEASE_CREATE BAdI: Release Creation for Sched.Agrmts with Release Docu.
ME_REQ_OI_EXT Commitment Update in the Case of External Requisitions
ME_REQ_POSTED Purchase Requisition Posted
ME_TAX_FROM_ADDRESS Tax jurisdiction code taken from address
ME_TRF_RULE_CUST_OFF BADI for Deactivation of Field T161V-REVFE
ME_TRIGGER_ATP Triggers New ATP for Changes in EKKO, EKPO, EKPV
ME_WRF_STD_DNG PO Controlling Reminder: Extension to Standard Reminder
MM_DELIVERY_ADDR_SAP Determination of Delivery Address
MM_EDI_DESADV_IN Supplementation of Delivery Interface from Purchase Order
SMOD_MRFLB001 Control Items for Contract Release Order
AMPL0001 User subscreen for additional data on AMPL
LMEDR001 Enhancements to print program
LMELA002 Adopt batch no. from shipping notification when posting
LMELA010 Inbound shipping notification: Transfer item data from
LMEQR001 User exit for source determination
LMEXF001 Conditions in Purchasing Documents Without Invoice Rece
LWSUS001 Customer-Specific Source Determination in Retail
M06B0001 Role determination for purchase requisition release
M06B0002 Changes to comm. structure for purchase requisition rel
M06B0003 Number range and document number
M06B0004 Number range and document number
M06B0005 Changes to comm. structure for overall release of requi
M06E0004 Changes to communication structure for release purch. d
M06E0005 Role determination for release of purchasing documents
ME590001 Grouping of requsitions for PO split in ME59
MEETA001 Define schedule line type (backlog, immed. req., previe
MEFLD004 Determine earliest delivery date f. check w. GR (only P
MELAB001 Gen. forecast delivery schedules: Transfer schedule imp
MEQUERY1 Enhancement to Document Overview ME21N/ME51N
MEVME001 WE default quantity calc. and over/ underdelivery toler
MM06E001 User exits for EDI inbound and outbound purchasing docu
MM06E003 Number range and document number
MM06E004 Control import data screens in purchase order
MM06E005 Customer fields in purchasing document
MM06E007 Change document for requisitions upon conversion into P
MM06E008 Monitoring of contr. target value in case of release or
MM06E009 Relevant texts for "Texts exist" indicator
MM06E010 Field selection for vendor address
MMAL0001 ALE source list distribution: Outbound processing
MMAL0002 ALE source list distribution: Inbound processing
MMAL0003 ALE purcasing info record distribution: Outbound proces
MMAL0004 ALE purchasing info record distribution: Inbound proces
MMDA0001 Default delivery addresses
MMFAB001 User exit for generation of release order
MRFLB001
Regards,
Anirban -
Default Header text in Purchase Order
Dear All,
I want to have a default PO header text.I.e whenever I create a PO the header text say "This PO is for XYX" should come as default in Header Text. How this can be achived.Through Config OR using some Function module..
what are the config.steps.?
Thanks in advance .
Regards
AmarTry below steps this may help you
Adopt Purchase Order Header Text
To default the Header Text into the Purchase Order
Step 1 :- Maintain text in Vendor Master
MK02 - Change Vendor
Choose Extras -> Texts - Input the text in Purchasing memo
Step 2 :- Link Text types to Header text in Purchase Order
OMFV - Define rules for copying (adoption of) text
Choose Header Text
Choose Goto -> Linkage: text types -> To vendor
Filled in the field No. (e.g. 01 - Header Text), next tick whether you want the text to be adopted or for displayed only
Choose Update to save
Maybe you are looking for
-
Error while Executing the mapping
While I am executing the mapping this error is thrown by the server. It is big mapping and references many parent tables. ORA-12801: error signaled in parallel query server P001 ORA-01114: IO error writing block to file 201 (block # 523269) ORA-27069
-
Hi All, I don't understand ,why my offline Archive logs are in Big size. My Environment OS - -------------- SunOS usa0300ux636 5.10 Generic_138888-03 sun4v sparc SUNW,Sun-Blade-T6320 Oracle Version BANNER Oracle Database 10g Enterprise Edition Releas
-
Hi evryone, Someone know if in ECC 6.0 the idoc's structure are changed or not from 4.7 ? the custumer said that INVOIC2 is changed in ECC 6.0 thanks in advance Moderator message: please do some research before asking, e.g. check the version history
-
Hello, i got Acrobat SDK and i am not clear wich part is Acrobat and wich part is Reader. I in my Delphi application i have to view a PDF in FullScreen-Mode and its annotations on second screen. This Application should work at every workstation with
-
I purchased a MacBook Air in July, 2013. I have later learnt that Apple has made iWorks free for OSX Mavericks users. However, the App Store still shows the package as paid for me. I want to know a way of downloading it for free.