Bapi for MRP simulation
Hi everybody.
I need a BAPI to run a MRP (MD02 like) for a material in a plant, in test mode, and then recover the final u2018available quantityu2019 from this running, in order to show it in a report development as u2018Suggested purchasing quantityu2019.
Any suggestions would be appreciated.
HI!
Try,
MD_MRP_SINGLE_MAT_REPLAN
BAPI_ALM_ORDER_MAINTAIN
hope this will helps you.
regards,
Kiran
Similar Messages
-
Bapi for mrp wfich has material quantity as import parameter
hi to all,
i need a bapi for mpr run which has material quantity as import paramaeter so that we can create pr for given material quantity.
Regards,
Manoj Rwat.HI!
Try,
MD_MRP_SINGLE_MAT_REPLAN
BAPI_ALM_ORDER_MAINTAIN
hope this will helps you.
regards,
Kiran -
BAPI for Depriciation simulation data of Internal order(Investment tab K01)
Hi experts,
I am new to asset accounting.
I have to a requirement where in the Asset class(ANIA-ANLKL) and capitalization data(ANIA-AKTIV) will be provided to me in an input file for a particular internal order(AUFK-AUFNR) and through my custom ABAP code i have to create Depriciation simulation data for that internal order.
is there any BAPI/FM by which Depriciation simulation data for internal order can be created ??Hi Heidi,
I also have the same requirement as yours above. have you had an answer already? If yes, could you please share how can you deal with this requirement?
Appreciated your help,
Huyen -
I create material using bapi BAPI_MATERIAL_SAVEDATA
in VIEW MRP1 it need to use the button 'mrp area' to inut the mrp area
double click and inout mrp type , mrp controller .....
is there anyone konw the bapi to do it ?
many thanks!!BAPI_MATERIAL_SAVEDATA field MARA-KZKFG not in ClientData
if its not in BAPI_MARA then you have to use ExtensionIn table to populate this field.
In Extensionin Table you have to enter the following two fields
structure name "BAPI_TE_MARA" and
the values for all the fields in this structure in valuepart1 field.
matnr (18), zfield1(10), zfield2(10)
Then it_extensionin-valuepart1 should have matnr in the first 18 char's and then zfield1 in the next 10 chars and zfield2 in the next 10 chars. so you should have filled the first 38 chars of valuepart1. In your case you dont need is_bapi_te_mara
you can just say
it_extensionin-valuepart1+0(18) = matnr.
it_extensionin_valuepart1+18(10) = zfield1
it_extensionin_valuepart1+28(10) = zfield2
append.
it should be something like this. Please try this and let me know if you still face any problems. Let me know the structure of bapi_te_mara.
BAPI_TE_MARA looks like the following;
MATERIAL MATNR CHAR 18 0
.APPEND ZABAPI_TE_MARA 0 0 Missing fields fo
EXTWG EXTWG CHAR 18 0 Ext
ZZLSTATION1 ZLSTATION1 CHAR 13 0 Line
ZZLFEEDER1 ZLFEEDER1 CHAR 12 0 Line
FUNCTION z_mmc_local_material_create.
""Local interface:
*" IMPORTING
*" VALUE(SINGLE) TYPE CHAR1
*" VALUE(IV_UNAME) TYPE SYUNAME OPTIONAL
*" EXPORTING
*" VALUE(MESSAGE) TYPE ZCHAR150
*" TABLES
*" MATDATA STRUCTURE ZMMCLOCMM
*" EXCEPTIONS
*" ERROR
TABLES: zmmcuser. "DG28347E
TYPE-POOLS shlp.
Tables
TABLES: t9mmclocmm,
t9mmcuser,
t100,
z19ppl_mm_dat,
t134t,
t9mmclocmt,
z19sloccon.
Strutures and internal tables
DATA: is_headdata LIKE bapimathead,
is_clientdata LIKE bapi_mara,
is_clientdatax LIKE bapi_marax,
is_plantdata LIKE bapi_marc,
is_plantdatax LIKE bapi_marcx,
is_forecastparameters LIKE bapi_mpop,
is_forecastparametersx LIKE bapi_mpopx,
is_planningdata LIKE bapi_mpgd,
is_planningdatax LIKE bapi_mpgdx,
is_storagelocationdata LIKE bapi_mard,
is_storagelocationdatax LIKE bapi_mardx,
is_valuationdata LIKE bapi_mbew,
is_valuationdatax LIKE bapi_mbewx,
is_warehousenumberdata LIKE bapi_mlgn,
is_warehousenumberdatax LIKE bapi_mlgnx,
is_salesdata LIKE bapi_mvke,
is_salesdatax LIKE bapi_mvkex,
is_storagetypedata LIKE bapi_mlgt,
is_storagetypedatax LIKE bapi_mlgtx,
is_return LIKE bapiret2,
is_bapi_te_mara LIKE bapi_te_mara,
is_bapi_te_marax LIKE bapi_te_marax,
it_materialdescription LIKE bapi_makt
OCCURS 0
WITH HEADER LINE,
it_unitsofmeasure LIKE bapi_marm
OCCURS 0
WITH HEADER LINE,
it_unitsofmeasurex LIKE bapi_marmx
OCCURS 0
WITH HEADER LINE,
it_internationalartnos LIKE bapi_mean
OCCURS 0
WITH HEADER LINE,
it_materiallongtext LIKE bapi_mltx
OCCURS 0
WITH HEADER LINE,
it_taxclassifications LIKE bapi_mlan
OCCURS 0
WITH HEADER LINE,
it_returnmessages LIKE bapi_matreturn2
OCCURS 0
WITH HEADER LINE,
it_prtdata LIKE bapi_mfhm
OCCURS 0
WITH HEADER LINE,
it_prtdatax LIKE bapi_mfhmx
OCCURS 0
WITH HEADER LINE,
it_extensionin LIKE bapiparex
OCCURS 0
WITH HEADER LINE,
it_extensioninx LIKE bapiparexx
OCCURS 0
WITH HEADER LINE.
DATA: BEGIN OF it_error OCCURS 0,
uname LIKE t9mmcuser-uname,
cltprt LIKE z19ppl_mm_dat-cltprt,
prttx LIKE z19ppl_mm_dat-prttx,
message(150),
msgno(23),
END OF it_error.
DATA: BEGIN OF it_class OCCURS 0,
mtart LIKE t9mmclocmm-mtart,
traw LIKE t9mmclocmm-traw,
cltprt LIKE z19ppl_mm_dat-cltprt,
prttx LIKE z19ppl_mm_dat-prttx,
END OF it_class.
DATA: BEGIN OF it_mmflag OCCURS 0,
cltprt LIKE z19ppl_mm_dat-cltprt,
mmflag LIKE z19ppl_mm_dat-mmflag,
END OF it_mmflag.
DATA: BEGIN OF it_extend OCCURS 0.
INCLUDE STRUCTURE zmmclocmm.
DATA: END OF it_extend.
BDC Data
DATA: BEGIN OF it_bdctab OCCURS 30.
INCLUDE STRUCTURE bdcdata.
DATA: END OF it_bdctab.
Data returned from transaction
DATA: BEGIN OF it_trn_ret OCCURS 10.
INCLUDE STRUCTURE bdcmsgcoll.
DATA: END OF it_trn_ret.
Email
DATA: BEGIN OF it_mail_text OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA: END OF it_mail_text.
Storage location and warehouse data
DATA: BEGIN OF it_whse OCCURS 0,
cltprt LIKE zmmclocmm-cltprt,
lgnum LIKE z19sloccon-lgnum,
END OF it_whse.
DATA: BEGIN OF it_sloc OCCURS 0,
cltprt LIKE zmmclocmm-cltprt,
lgort LIKE z19sloccon-lgort,
END OF it_sloc.
DATA: BEGIN OF it_lgnum OCCURS 0,
lgnum LIKE z19sloccon-lgnum,
END OF it_lgnum.
DATA: BEGIN OF it_lgort OCCURS 0,
lgort LIKE z19sloccon-lgort,
END OF it_lgort.
DATA: BEGIN OF it_sloc_extend OCCURS 0.
INCLUDE STRUCTURE zmmclocmm.
DATA: END OF it_sloc_extend.
Start of Insert TT67507
DATA: BEGIN OF it_qm OCCURS 0,
matnr LIKE mara-matnr,
werks LIKE marc-werks,
END OF it_qm.
End of Insert TT67507
DATA: v_slin TYPE i,
v_wlin TYPE i,
v_index TYPE i,
v_lgort LIKE z19sloccon-lgort,
v_lgnum LIKE z19sloccon-lgnum.
Work fields
DATA: v_ermsg(500),
v_subrc LIKE sy-subrc,
v_mode,
v_mail_subject LIKE sodocchgi1-obj_descr,
v_email LIKE sadrud,
v_single,
v_message TYPE zchar150,
v_mtart LIKE t9mmclocmt-mtart,
v_traw LIKE t9mmclocmt-traw,
v_skip,
v_hold_cltprt LIKE z19ppl_mm_dat-cltprt.
Constants
CONSTANTS: co_mark VALUE 'X',
co_klart LIKE rmclf-klart VALUE '001',
co_class1 LIKE rmclf-class VALUE 'PARTNUM', "DK69475E
co_class2 LIKE rmclf-class VALUE 'L/STATION', "DK69475E
co_ssqss(4) VALUE '0001', "TT67505
co_insp1(2) VALUE '01', "TT67505
co_insp2(2) VALUE '08'. "TT67505
CHECK NOT matdata[] IS INITIAL.
v_single = single.
CLEAR: it_class,
it_error,
message,
v_message,
it_extend,
v_hold_cltprt.
REFRESH: it_class,
it_error,
it_extend,
it_sloc,
it_whse,
it_sloc_extend.
LOOP AT matdata.
Get default data
SELECT SINGLE * FROM t9mmclocmm
WHERE mtart = matdata-mtart
AND traw = matdata-traw.
IF sy-subrc NE 0.
IF v_single = space.
SELECT uname INTO t9mmcuser-uname
FROM t9mmcuser WHERE mtart = matdata-mtart
AND traw = matdata-traw.
CLEAR it_error.
it_error-uname = t9mmcuser-uname.
it_error-cltprt = matdata-cltprt.
it_error-prttx = matdata-prttx.
CONCATENATE 'Table T9MMCLOCMM not maintained for'
matdata-mtart
matdata-traw
INTO it_error-message SEPARATED BY space.
APPEND it_error.
ENDSELECT.
ELSE.
CONCATENATE 'Table T9MMCLOCMM not maintained for'
matdata-mtart
matdata-traw
INTO v_message SEPARATED BY space.
ENDIF.
CONTINUE.
ENDIF.
Extract storage location and warehouse data
CLEAR: v_lgort,
v_lgnum.
PERFORM fm_sloc_whse_data USING matdata-cltprt
matdata-prttx.
IF t9mmclocmm-lgort NE space.
v_lgort = t9mmclocmm-lgort.
ENDIF.
Initialise
CLEAR: is_headdata,
is_clientdata,
is_clientdatax,
it_materialdescription,
it_taxclassifications,
is_plantdata,
is_plantdatax,
is_forecastparameters,
is_forecastparametersx,
is_storagelocationdata,
is_storagelocationdatax,
is_valuationdata,
is_valuationdatax,
is_warehousenumberdata,
is_warehousenumberdatax,
is_salesdata,
is_salesdatax,
is_bapi_te_mara,
is_bapi_te_marax,
it_extensionin,
it_extensioninx,
is_return,
it_mail_text.
REFRESH: it_materialdescription,
it_taxclassifications,
it_extensionin,
it_extensioninx,
it_mail_text.
Fill BAPI structures
is_headdata-material_external = matdata-cltprt.
is_headdata-ind_sector = t9mmclocmm-mbrsh.
is_headdata-matl_type = t9mmclocmm-mtart.
is_headdata-basic_view = co_mark.
is_headdata-sales_view = co_mark.
is_headdata-purchase_view = co_mark.
is_headdata-mrp_view = co_mark.
is_headdata-storage_view = co_mark.
is_headdata-warehouse_view = co_mark.
is_headdata-quality_view = co_mark.
is_headdata-account_view = co_mark.
is_headdata-cost_view = co_mark.
IF t9mmclocmm-prmod NE space.
is_headdata-forecast_view = co_mark.
ENDIF.
Basic data
IF t9mmclocmm-meins = space.
is_clientdata-base_uom = matdata-meins.
ELSE.
is_clientdata-base_uom = t9mmclocmm-meins.
ENDIF.
is_clientdata-matl_group = t9mmclocmm-matkl.
is_clientdata-division = t9mmclocmm-spart.
is_clientdatax-base_uom = co_mark.
is_clientdatax-matl_group = co_mark.
is_clientdatax-division = co_mark.
PANDA
IF t9mmclocmm-traw = 'P1'.
is_clientdata-trans_grp = t9mmclocmm-tragr.
is_clientdatax-trans_grp = co_mark.
ENDIF.
Quality
is_clientdata-qm_procmnt = co_mark. "TT67507
is_clientdatax-qm_procmnt = co_mark. "TT67505
is_plantdata-ctrl_key = co_ssqss. "TT67507
is_plantdatax-ctrl_key = co_mark. "TT67507
Description data
it_materialdescription-langu = 'E'.
it_materialdescription-matl_desc = matdata-prttx.
APPEND it_materialdescription.
Tax classifications for PANDA
IF t9mmclocmm-traw = 'P1'.
CLEAR it_taxclassifications.
it_taxclassifications-depcountry = t9mmclocmm-aland.
it_taxclassifications-tax_type_1 = t9mmclocmm-tatyp.
it_taxclassifications-taxclass_1 = t9mmclocmm-taxkm.
APPEND it_taxclassifications.
ENDIF.
Country of origin for XP via ZMMCM
IF v_single NE space
AND t9mmclocmm-traw = 'XP'
AND t9mmclocmm-herkl = space.
t9mmclocmm-herkl = matdata-herkl.
ENDIF.
Plant data
is_plantdata-plant = t9mmclocmm-werks.
is_plantdata-profit_ctr = t9mmclocmm-prctr.
is_plantdata-pur_group = t9mmclocmm-ekgrp.
is_plantdata-pur_status = t9mmclocmm-mmsta.
is_plantdata-comm_code = t9mmclocmm-stawn.
is_plantdata-countryori = t9mmclocmm-herkl.
is_plantdata-pvalidfrom = sy-datum. "mmstd
is_plantdata-sloc_exprc = t9mmclocmm-lgfsb.
is_plantdata-mrpprofile = t9mmclocmm-dispr.
is_plantdata-mrp_ctrler = t9mmclocmm-dispo.
is_plantdata-lotsizekey = t9mmclocmm-disls.
is_plantdatax-plant = t9mmclocmm-werks.
is_plantdatax-profit_ctr = co_mark.
is_plantdatax-pur_group = co_mark.
is_plantdatax-pur_status = co_mark.
is_plantdatax-comm_code = co_mark.
is_plantdatax-countryori = co_mark.
is_plantdatax-pvalidfrom = co_mark.
is_plantdatax-sloc_exprc = co_mark.
is_plantdatax-mrpprofile = co_mark.
is_plantdatax-mrp_ctrler = co_mark.
is_plantdatax-lotsizekey = co_mark.
PANDA
IF t9mmclocmm-traw = 'P1'.
is_plantdata-loadinggrp = t9mmclocmm-ladgr.
is_plantdata-gr_pr_time = t9mmclocmm-webaz.
is_plantdata-specprocty = t9mmclocmm-sobsk.
is_plantdata-dep_req_id = t9mmclocmm-sbdkz.
is_plantdatax-loadinggrp = co_mark.
is_plantdatax-gr_pr_time = co_mark.
is_plantdatax-specprocty = co_mark.
is_plantdatax-dep_req_id = co_mark.
ENDIF.
Forecast data
IF t9mmclocmm-prmod NE space.
is_forecastparameters-plant = t9mmclocmm-werks.
is_forecastparameters-fore_model = t9mmclocmm-prmod.
is_forecastparametersx-plant = t9mmclocmm-werks.
is_forecastparametersx-fore_model = co_mark.
ENDIF.
Storage location data
IF t9mmclocmm-traw = 'P1' " PANDA
OR v_lgort NE space.
is_storagelocationdata-plant = t9mmclocmm-werks.
is_storagelocationdata-stge_loc = v_lgort.
is_storagelocationdatax-plant = t9mmclocmm-werks.
is_storagelocationdatax-stge_loc = v_lgort.
ENDIF.
Valuation data
is_valuationdata-val_area = t9mmclocmm-werks.
is_valuationdata-val_type = space.
is_valuationdata-val_class = t9mmclocmm-bklas.
is_valuationdata-orig_group = t9mmclocmm-hrkft.
is_valuationdatax-val_area = t9mmclocmm-werks.
is_valuationdatax-val_type = space.
is_valuationdatax-val_class = co_mark.
is_valuationdatax-orig_group = co_mark.
Warehouse data
IF v_lgnum NE space.
is_warehousenumberdata-whse_no = v_lgnum.
is_warehousenumberdatax-whse_no = v_lgnum.
ENDIF.
Sales data for PANDA
IF t9mmclocmm-traw = 'P1'.
is_salesdata-sales_org = t9mmclocmm-vkorg.
is_salesdata-distr_chan = t9mmclocmm-vtweg.
is_salesdata-delyg_plnt = t9mmclocmm-dwerk.
is_salesdata-item_cat = t9mmclocmm-mtpos.
is_salesdatax-sales_org = t9mmclocmm-vkorg.
is_salesdatax-distr_chan = t9mmclocmm-vtweg.
is_salesdatax-delyg_plnt = co_mark.
is_salesdatax-item_cat = co_mark.
ENDIF.
Additional data
is_bapi_te_mara-material = matdata-cltprt.
is_clientdata-extmatlgrp = t9mmclocmm-extwg.
is_bapi_te_mara-kzkfg = t9mmclocmm-kzkfg.
is_bapi_te_marax-material = matdata-cltprt.
is_clientdatax-extmatlgrp = co_mark.
is_bapi_te_marax-kzkfg = co_mark.
it_extensionin-structure = 'BAPI_TE_MARA'.
it_extensionin-valuepart1+0(18) = matdata-cltprt.
it_extensionin-valuepart1+18(18) = 'NEW TEST'.
APPEND it_extensionin.
it_extensioninx-structure = 'BAPI_TE_MARAX'.
it_extensioninx-valuepart1+0(18) = matdata-cltprt.
it_extensioninx-valuepart1+18(1) = 'X'.
APPEND it_extensioninx.
Call BAPI
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = is_headdata
clientdata = is_clientdata
clientdatax = is_clientdatax
plantdata = is_plantdata
plantdatax = is_plantdatax
forecastparameters = is_forecastparameters
forecastparametersx = is_forecastparametersx
planningdata = is_planningdata
planningdatax = is_planningdatax
storagelocationdata = is_storagelocationdata
storagelocationdatax = is_storagelocationdatax
valuationdata = is_valuationdata
valuationdatax = is_valuationdatax
warehousenumberdata = is_warehousenumberdata
warehousenumberdatax = is_warehousenumberdatax
salesdata = is_salesdata
salesdatax = is_salesdatax
storagetypedata = is_storagetypedata
storagetypedatax = is_storagetypedatax
IMPORTING
return = is_return
TABLES
materialdescription = it_materialdescription
unitsofmeasure = it_unitsofmeasure
unitsofmeasurex = it_unitsofmeasurex
internationalartnos = it_internationalartnos
materiallongtext = it_materiallongtext
taxclassifications = it_taxclassifications
returnmessages = it_returnmessages
prtdata = it_prtdata
prtdatax = it_prtdatax
extensionin = it_extensionin
extensioninx = it_extensioninx. -
Function Module or BAPI for Sales price calculation and Pricing worklist
Hi Retail experts,
We frequently change purchase conditions, but not that frequently for cases like perishables, so sales price calculations needs to be done each time. This means pricing worklist generation and release is done often and then sales price recalculation is done each time article wise and for various organization level.
We have 15000 articles for which purcahse conditions changes, it is impossible to generate and release pricing worklist and do sales price calculation for each article
So solution may be to find a FM/BAPI for the following transactions and automate them.
Do you know FM/BAPI for VKP5/VKBP or VKP6, WVN0, WVN1 transactions.
Regards
BobHI Madhu,
Thanks for the reply,
I am looking for BAPI or FM which will check all pricing condition types( like MRP of the Material(table A304), discounts(A800,A802,A803,A804) for that customer and Tax) and give me the value(KONP-KBETR).
I can only pass Customer, material, quantity etc.. so that BAPI or FM has do all standred checks/ validation and give the
KONP-KBETR for all condition types like MRP, discounts, Tax. we are developing the custom program for sales order creation so we require the all this before saving the sales order.
Regards,
Nagesh
Edited by: nageshdb4u on Mar 5, 2011 12:05 PM -
Profit Center not getting uploaded through BAPI for MM01. Pls help
Hello all,
I am getting an errror while uploading a file through BAPI for MM01 , The error says
Error:
Profit center 1000/sslcommon does not exist
for material: AC2
*& Report ZBAPI_DUMMY
REPORT ZBAPI_MM01.
*& Report ZBAPI2
TABLES
FLAGS *
DATA: F_STOP. " Flag used to stop processing
DATA DECLARATIONS *
DATA : V_EMPTY TYPE I, " No. of empty records
V_TOTAL TYPE I. " Total no. of records.
STRUCTURES & INTERNAL TABLES
*--- BAPI structures
DATA: BAPI_HEAD LIKE BAPIMATHEAD, " Header Segment with Control
BAPI_MAKT LIKE BAPI_MAKT, " Material Description
BAPI_MARA1 LIKE BAPI_MARA, " Client Data
BAPI_MARAX LIKE BAPI_MARAX, " Checkbox Structure for BAPI_MARA
BAPI_MARC1 LIKE BAPI_MARC, " Plant View
BAPI_MARCX LIKE BAPI_MARCX, " Checkbox Structure for BAPI_MARC
BAPI_MBEW1 LIKE BAPI_MBEW, " Accounting View
BAPI_MBEWX LIKE BAPI_MBEWX, " Checkbox Structure for BAPI_MBEW
BAPI_RETURN LIKE BAPIRET2, " Return Parameter
BAPI_MARDL LIKE BAPI_MARD,
BAPI_MARDX LIKE BAPI_MARDX.
*--- Internal table to hold excel file data
DATA: IT_INTERN TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
*--- Internal table to hold Matetrial descriptions
DATA: BEGIN OF IT_MAKT OCCURS 100.
INCLUDE STRUCTURE BAPI_MAKT.
DATA: END OF IT_MAKT.
*--- Internal to hold the records in the text file
DATA : BEGIN OF IT_DATA OCCURS 100,
WERKS(4), " Plant
MTART(4), " Material type
MATNR(18), " Material number
MATKL(9) , " Material group
MBRSH(1), " Industry sector
MEINS(3), " Base unit of measure
SPART(2), " Division
EKGRP(3), " Purchasing group
PRCTR(10), " Profit Center
VPRSV(1), " Price control indicator
BKLAS(4), "Valuation Class
*stprs(12), " Standard price
PEINH(3), " Price unit
SPRAS(2), " Language key
MAKTX(40), " Material description
LGORT(4) , " storage location
DISMM(2) , "MRP TYPE
VERPR(23), " Moving Average Price
MTVFP(2) , " Availability Check
DISLS(2) , "Lot Size
DISPO(3) , "MRP Controller
BESKZ(1) , "Procurment Type
FHORI(3) , "SCHEDMARGIN KEY
PERKZ(1) , "Period Indicator
END OF IT_DATA.
SELECTION SCREEN. *
SELECTION-SCREEN BEGIN OF BLOCK SCR1 WITH FRAME TITLE TEXT-111.
PARAMETER : P_FILE TYPE RLGRAP-FILENAME OBLIGATORY " Input File
PARAMETER : P_MAX(4) OBLIGATORY DEFAULT '100'. " no.of recs in a session
PARAMETERS: P_HEADER TYPE I DEFAULT 0. " Header Lines
PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
P_BEGROW TYPE I DEFAULT 2 NO-DISPLAY,
P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
SELECTION-SCREEN END OF BLOCK SCR1.
AT SELECTION-SCREEN *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
*--- Validating file
PERFORM VALIDATE_FILE USING P_FILE.
START-OF-SELECTION
START-OF-SELECTION.
*--- Perform to convert the Excel data into an internal table
PERFORM CONVERT_XLS_ITAB.
IF NOT IT_DATA[] IS INITIAL.
*--- Perform to delete Header lines
PERFORM DELETE_HEADER_EMPTY_RECS.
ENDIF.
END OF SELECTION. *
END-OF-SELECTION.
*--- Perform to upload Material Master data
PERFORM UPLOAD_MATMAS.
Form : validate_input_file
Description : To provide F4 help for file if read from PC
FORM VALIDATE_FILE USING F_FILE TYPE RLGRAP-FILENAME.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
CHANGING
FILE_NAME = F_FILE
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE S010(ZLKPL_MSGCLASS). " 'Error in getting filename'.
ENDIF.
ENDFORM. " validate_input_file
*& Form CONVER_XLS_ITAB
text
FORM CONVERT_XLS_ITAB.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = P_FILE
I_BEGIN_COL = P_BEGCOL
I_BEGIN_ROW = P_BEGROW
I_END_COL = P_ENDCOL
I_END_ROW = P_ENDROW
TABLES
INTERN = IT_INTERN.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*--- Perform to move the data into an internal data
PERFORM MOVE_DATA.
ENDFORM. " CONVERT_XLS_ITAB
*& Form MOVE_DATA
text
FORM MOVE_DATA.
DATA : LV_INDEX TYPE I.
FIELD-SYMBOLS <FS> .
*--- Sorting the internal table
SORT IT_INTERN BY ROW COL.
CLEAR IT_INTERN.
LOOP AT IT_INTERN.
MOVE IT_INTERN-COL TO LV_INDEX.
*--- Assigning the each record to an internal table row
ASSIGN COMPONENT LV_INDEX OF STRUCTURE IT_DATA TO <FS> .
*--- Asigning the field value to a field symbol
MOVE IT_INTERN-VALUE TO <FS> .
AT END OF ROW.
APPEND IT_DATA.
CLEAR IT_DATA.
ENDAT.
ENDLOOP.
ENDFORM. " MOVE_DATA
*& Form DELETE_HEADER_EMPTY_RECS
To delete the Header and empty records
FORM DELETE_HEADER_EMPTY_RECS.
DATA: LV_TABIX LIKE SY-TABIX.
IF NOT P_HEADER IS INITIAL.
LOOP AT IT_DATA.
IF P_HEADER > 0 AND NOT IT_DATA IS INITIAL.
DELETE IT_DATA FROM 1 TO P_HEADER.
P_HEADER = 0.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
CLEAR IT_DATA.
*--- To delete the empty lines from internal table
LOOP AT IT_DATA.
LV_TABIX = SY-TABIX.
IF IT_DATA IS INITIAL.
V_EMPTY = V_EMPTY + 1.
DELETE IT_DATA INDEX LV_TABIX..
ENDIF.
ENDLOOP.
CLEAR IT_DATA.
*--- Total no of recs in file
DESCRIBE TABLE IT_DATA LINES V_TOTAL.
IF V_TOTAL = 0.
MESSAGE I013(ZLKPL_MSGCLASS). " No records in the file
F_STOP = 'X'.
STOP.
ENDIF.
ENDFORM. " DELETE_HEADER_EMPTY_RECS
*& Form UPLOAD_MATMAS
to upload Material Master data
FORM UPLOAD_MATMAS .
LOOP AT IT_DATA.
Header
BAPI_HEAD-MATERIAL = IT_DATA-MATNR.
BAPI_HEAD-IND_SECTOR = IT_DATA-MBRSH.
BAPI_HEAD-MATL_TYPE = IT_DATA-MTART.
BAPI_HEAD-BASIC_VIEW = 'X'.
BAPI_HEAD-PURCHASE_VIEW = 'X'.
BAPI_HEAD-ACCOUNT_VIEW = 'X'.
BAPI_HEAD-storage_view ='X'.
bapi_head-mrp_view = 'X'.
bapi_head-COST_view ='X'.
Material Description
REFRESH IT_MAKT.
IT_MAKT-LANGU = IT_DATA-SPRAS.
IT_MAKT-MATL_DESC = IT_DATA-MAKTX.
APPEND IT_MAKT.
Client Data - Basic
BAPI_MARA1-MATL_GROUP = IT_DATA-MATKL.
BAPI_MARA1-BASE_UOM = IT_DATA-MEINS.
bapi_mara1-unit_of_wt = it_data-gewei.
BAPI_MARA1-DIVISION = IT_DATA-SPART.
BAPI_MARAX-MATL_GROUP = 'X'.
BAPI_MARAX-BASE_UOM = 'X'.
BAPI_MARAX-UNIT_OF_WT = 'X'.
BAPI_MARAX-DIVISION = 'X'.
Plant - Purchasing
BAPI_MARC1-PLANT = IT_DATA-WERKS.
BAPI_MARC1-PUR_GROUP = IT_DATA-EKGRP.
BAPI_MARC1-PROFIT_CTR = IT_DATA-PRCTR.
BAPI_MARC1-MRP_TYPE = IT_DATA-DISMM.
BAPI_MARC1-AVAILCHECK = IT_DATA-MTVFP.
BAPI_MARC1-LOTSIZEKEY = IT_DATA-DISLS.
BAPI_MARC1-MRP_CTRLER = IT_DATA-DISPO.
BAPI_MARC1-PROC_TYPE = IT_DATA-BESKZ.
BAPI_MARC1-SM_KEY = IT_DATA-FHORI.
BAPI_MARC1-PERIOD_IND = IT_DATA-PERKZ.
BAPI_MARCX-PLANT = IT_DATA-WERKS.
BAPI_MARCX-PUR_GROUP = 'X'.
BAPI_MARCX-AVAILCHECK = 'X'.
BAPI_MARCX-PROFIT_CTR = 'X'.
BAPI_MARCX-MRP_TYPE = 'X'.
BAPI_MARCX-MRP_CTRLER = 'X'.
BAPI_MARCX-SM_KEY = 'X'.
BAPI_MARCX-LOTSIZEKEY = 'X'.
Storage Location.
BAPI_MARDL-PLANT = IT_DATA-WERKS.
BAPI_MARDL-STGE_LOC = IT_DATA-LGORT.
BAPI_MARDX-PLANT = IT_DATA-WERKS.
BAPI_MARDX-STGE_LOC = IT_DATA-LGORT.
Accounting
BAPI_MBEW1-VAL_AREA = IT_DATA-WERKS.
BAPI_MBEW1-PRICE_CTRL = IT_DATA-VPRSV.
BAPI_MBEW1-VAL_CLASS = IT_DATA-BKLAS.
BAPI_MBEW1-MOVING_PR = IT_DATA-VERPR.
bapi_mbew1-std_price = it_data-stprs.
BAPI_MBEW1-PRICE_UNIT = IT_DATA-PEINH.
BAPI_MBEWX-VAL_AREA = IT_DATA-WERKS.
BAPI_MBEWX-PRICE_CTRL = 'X'.
BAPI_MBEWX-STD_PRICE = 'X'.
BAPI_MBEWX-PRICE_UNIT = 'X'.
BAPI_MBEWX-MOVING_PR = 'X'.
*--- BAPI to create material
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
HEADDATA = BAPI_HEAD
CLIENTDATA = BAPI_MARA1
CLIENTDATAX = BAPI_MARAX
PLANTDATA = BAPI_MARC1
PLANTDATAX = BAPI_MARCX
FORECASTPARAMETERS =
FORECASTPARAMETERSX =
PLANNINGDATA =
PLANNINGDATAX =
STORAGELOCATIONDATA = BAPI_MARDL
STORAGELOCATIONDATAX = BAPI_MARDX
VALUATIONDATA = BAPI_MBEW1
VALUATIONDATAX = BAPI_MBEWX
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA = BAPI_MVKE1
SALESDATAX = BAPI_MVKEX
STORAGETYPEDATA =
STORAGETYPEDATAX =
IMPORTING
RETURN = BAPI_RETURN
TABLES
MATERIALDESCRIPTION = IT_MAKT
UNITSOFMEASURE =
UNITSOFMEASUREX =
INTERNATIONALARTNOS =
MATERIALLONGTEXT =
TAXCLASSIFICATIONS =
RETURNMESSAGES =
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
IF BAPI_RETURN-TYPE = 'E'.
WRITE:/ 'Error:' ,BAPI_RETURN-MESSAGE ,'for material:' ,
IT_DATA-MATNR.
ELSEIF BAPI_RETURN-TYPE = 'S'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN = BAPI_RETURN
WRITE: 'Successfully created material' ,IT_DATA-MATNR.
ENDIF.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN = BAPI_RETURN
ENDLOOP.
ENDFORM. " UPLOAD_MATMASthe Profit center 1000/sslcommon not created. first create the profit center and then upload your data.check tcode KE52 for created profit centers...
-
Hello Experts,
I am in need for standard BAPIs for the following info types. If it is not available please help me with some way.
<b>Infotypes:
 0002 (Personal Data)
 0006 (Addresses)
 0009 (Bank details)
 0021 (Family member/dependents)
 0023 (Other/Previous employers)
 0028 (Internal medical service) subtype 0008 (Blood group)
 0185 (Personal IDs)
 0591 (Nominations)
 0000 (Actions)
 0001 (Organizational Assignment)
 0007 (Planned working time)
 0016 (Contract Elements)
 0017 (Travel Privileges)
 2006 (Absence Quotas)</b>
Thanks & Regards
NigeshHi,
list of BAPI Funtions
0035 BAPI for Grant Master Data
BAPI_0035_CHANGE Change grant master data
BAPI_0035_CREATE Create GM grant master data
BAPI_0035_GET_DETAIL Get detail of grant master data
0036 BAPI for BudgetEntryDocGM
BAPI_0036_CREATE Create GM Budgeting Entry Document
BAPI_0036_GET_DETAIL Get the detail of a GM budget entry document
BAPI_0036_GET_LIST Get list of GM budgeting entry docs.
BAPI_0036_REVERSE Reverse GM Budgteing Entry document
0038 BAPIs for Funded Program
BAPI_0038_CHANGE Change a Funded Program
BAPI_0038_CREATE Create Funded Program
BAPI_0038_DELETE Delete a Funded Program
BAPI_0038_GETDETAIL Get details to a Funded Program
BAPI_0038_GETLIST Get list of Funded Programs
0050 BAPI for BudgetEntryDocFM
BAPI_0050_CREATE Create FM Budgeting Entry document
BAPI_0050_GET_DETAIL Get FM budgeting entry document
BAPI_0050_GET_LIST Get list of budgeting entry documents
BAPI_0050_REVERSE Reverse FM Budgeting Entry document
0051 BAPI for BudgetFM (mass data)
BAPI_0051_GET_TOTALS Get FM budget totals
BAPI_0051_UPDATE FM Budgeting - Update totals
1031 Business Object BUS1031 (Activity Type)
BAPI_ACTIVITYTYPE_GETDETAIL Detail Information for Activity Type on Key Date
BAPI_ACTIVITYTYPE_GETLIST List of Activity Types Using Selection Criteria
BAPI_ACTIVITYTYPE_GETPRICES Output Activity Prices for Activity Types on Key Date
BAPI_ACTTYPE_CHANGEMULTIPLE Change One or More Activity Types
BAPI_ACTTYPE_CREATEMULTIPLE Create One or More Activity Types
2145 Business Objects Complaints AB (BAPI)
BAPI_ABCLAIM_CREATE AB-CWB: Create BAPI Complaint
4499 Business Object: Bank Statement
BAPI_ACCSTMT_CREATEFROMBALANCE Store account balance/check debit information
BAPI_ACCSTMT_CREATEFROMLOCKBOX Create lockbox data
BAPI_ACCSTMT_CREATEFROMPREVDAY Create Bank Statement/Day-End Statement
BAPI_ACCSTMT_CREATEFROMSAMEDAY Create Bank Statement/Today's Data
ABSE Object Type "Absence"
BAPI_ABSENCE_APPROVE Unlock absence
BAPI_ABSENCE_CHANGE Change absence
BAPI_ABSENCE_CREATE Create absence
BAPI_ABSENCE_DELETE Delete absence
BAPI_ABSENCE_GETDETAIL Read absence
BAPI_ABSENCE_GETDETAILEDLIST Read instances with data
BAPI_ABSENCE_GETLIST Read instances
BAPI_ABSENCE_REQUEST Create locked absence
BAPI_ABSENCE_SIMULATECREATION Simulation: Create absence
ACC4 FI/CO: BAPIs for UPDATE
BAPI_ACC_BILLING_CHECK Accounting: Check Billing Doc. (OAG: LOAD RECEIVABLE)
BAPI_ACC_BILLING_POST Accounting: Post invoice (OAG: LOAD RECEIVABLE)
BAPI_ACC_DOCUMENTS_RECORD Follow-On Document Numbers in Accounting for Multiple Source Documents
BAPI_ACC_EMPLOYEE_EXP_CHECK Accounting: Check G/L acct assignment for HR posting (OAG:POST JOURNAL
BAPI_ACC_EMPLOYEE_EXP_POST Accounting: Post G/L account assignment for HR posting (OAG:POST JOURN
BAPI_ACC_EMPLOYEE_PAY_CHECK Accounting: Check Vendor Acct Assignment for HR Posting (OAG:LOAD PAYA
BAPI_ACC_EMPLOYEE_PAY_POST Accounting: Post Vendor Acct Assignment for HR Posting (OAG: LOAD PAYA
BAPI_ACC_EMPLOYEE_REC_CHECK Accounting: Check Cust. Acct Assignmt for HR Posting (OAG:LOAD RECEIVA
BAPI_ACC_EMPLOYEE_REC_POST FI/CO: Post Customer Acct Assignment for HR Posting (OAG: LOAD RECEIVA
BAPI_ACC_GL_POSTING_CHECK Accounting: General G/L Account Posting
BAPI_ACC_GL_POSTING_POST Accounting: General G/L Account Posting
BAPI_ACC_GOODS_MOVEMENT_CHECK Accounting: Check Goods Movement (OAG: POST JOURNAL)
BAPI_ACC_GOODS_MOVEMENT_POST Accounting: Post Goods Movement (OAG: POST JOURNAL)
BAPI_ACC_INVOICE_RECEIPT_CHECK Accounting: Check Invoice Receipt (OAG: LOAD PAYABLE)
BAPI_ACC_INVOICE_RECEIPT_POST Accounting: Post Invoice Receipt (OAG: LOAD PAYABLE)
BAPI_ACC_PURCHASE_ORDER_CHECK Accounting: Check Purchase Order
BAPI_ACC_PURCHASE_ORDER_POST Accounting: Post Purchase Order
BAPI_ACC_PURCHASE_REQUI_CHECK Accounting: Check Purchase Requisition
BAPI_ACC_PURCHASE_REQUI_POST Accounting: Post Purchase Requisition
BAPI_ACC_SALES_ORDER_CHECK Accounting: Check Sales Order
BAPI_ACC_SALES_ORDER_POST Accounting: Post Sales Order
BAPI_ACC_SALES_QUOTA_CHECK Accounting: Check Customer Quotation
BAPI_ACC_SALES_QUOTA_POST Accounting: Post Customer Quotation
BAPI_ACC_TRAVEL_CHECK Accounting: Check Trip
BAPI_ACC_TRAVEL_POST Accounting: Post Trip
ACC5 FI/CO: BAPIs Asset Postings
BAPI_ACC_ASSET_ACQ_SETT_CHECK ACC: Asset Acquisition - Synchronous Determination of Capitalization V
BAPI_ACC_ASSET_ACQ_SETT_POST ACC: Asset Acquisition-Asynchronous Determination of Capitalization Va
BAPI_ACC_***_ACQUISITION_CHECK BAPI: Check Asset Acquisition
BAPI_ACC_***_INTRA_TRANS_CHECK Accounting: Post Asset Transfer
BAPI_ACC_***_POSTCAP_CHECK BAPI: Check Subsequent Capitalization
BAPI_ACC_***_RETIREMENT_CHECK BAPI: Check Asset Retirement
BAPI_ACC_***_TRANSFER_CHECK Accounting: Post Asset Transfer
BAPI_ACC_***_TRANSFER_POST Accounting: Post Asset Transfer
BAPI_ACC_***_TRANS_ACQ_CHECK Accounting: Check acquisition from transfer
BAPI_ACC_***_TRANS_ACQ_POST Accounting: Post acquisition from transfer
BAPI_ACC_***_TRANS_RET_CHECK Accounting: Post Asset Transfer
BAPI_ACC_AUC_ACQUISITION_CHECK Accounting: Asset Acquisition from Settlement
BAPI_ACC_AUC_ACQUISITION_POST Accounting: Asset Acquisition from Settlement
ACC6 Accounting: BAPIs for UPDATE II
BAPI_ACC_BILLING_REV_CHECK Accounting: Check Billing Document Reversal (OAG: LOAD RECEIVABLE)
BAPI_ACC_BILLING_REV_POST Accounting: Post Billing Doc.Reversal (OAG: LOAD RECEIVABLE)
BAPI_ACC_GL_POSTING_REV_CHECK Accounting: Check Reversal of General G/L Account Posting
BAPI_ACC_GL_POSTING_REV_POST Accounting: Post General G/L Posting Reversal
BAPI_ACC_GOODS_MOV_REV_CHECK Accounting: Check Goods Movement Reversal (OAG: POST JOURNAL)
BAPI_ACC_GOODS_MOV_REV_POST Accounting: Post Goods Movement Reversal (OAG: POST JOURNAL)
BAPI_ACC_INVOICE_REV_CHECK Accounting: Check Reversal of Invoice Receipt (OAG: LOAD PAYABLE)
BAPI_ACC_INVOICE_REV_POST Accounting: Post Invoice Receipt Reversal (OAG: LOAD PAYABLE)
BAPI_ACC_PYMNTBLK_UPDATE_CHECK Accounting: Check Changes to Payment Block for Open Items
BAPI_ACC_PYMNTBLK_UPDATE_POST Accounting: Post Changes to Payment Block for Open Items
ACC9 Accounting: BAPIs
BAPI_ACC_DOCUMENT_CHECK Accounting: Check
BAPI_ACC_DOCUMENT_POST Accounting: Posting
BAPI_ACC_DOCUMENT_REV_CHECK Accounting: Check Reversal
BAPI_ACC_DOCUMENT_REV_POST Accounting: Post Reversal
AEMM Additionals in integrated mat. maint.
BAPI_ADDITIONAL_MAINTAINDATA Create and Change Additionals Assignments (Retail)
BEACTIVITY Process modeling activity
BAPI_ACTIVITY_COMPARE Test Module for Modeling
BAPI_ACTIVITY_GETALLCOUPLING Determination of Coupling Events for Several Activities
BAPI_ACTIVITY_GETCOUPLING Get activity coupling events
BAPI_ACTIVITY_GETDETAIL Read diagram
BAPI_ACTIVITY_GETPOTCOUPLING Get potential coupling events between two activities
BAPI_ACTIVITY_GET_PARENTS Delivers Higher-Level Activities
BAPI_ACTIVTY_GETDIAGRAMIDS Read diagram
CRM_CO_SLS CO Interface CRM Sales
BAPI_ACCOUNTING_PROXY_UPLOAD Account Assignment Objects for CRM Transactions
FAGL_SKF_BAPI
BAPI_ACC_POST_STAT_KEYFIGURE
FKN5 BAPI Account Balances
BAPI_ACCOUNT_GETBALANCES Retrieves Balances for a Contract Acct
IPPEBAPI_ACT
BAPI_1179_EXISTENCECHECK
BAPI_1179_REPLICATE
BAPI_1179_SAVEREPLICA
IPPEBAPI_BAL
BAPI_1183_EXISTENCECHECK
BAPI_1183_REPLICATE
BAPI_1183_SAVEREPLICA
IPPEBAPI_CMP iPPE: Component BAPIs
BAPI_1176001_EXISTENCECHECK Check Existence of Product Structure Variant
BAPI_1176_EXISTENCECHECK Check Existence of a Product Structure Node
BAPI_1176_REPLICATE Replicate Product Structure Nodes
BAPI_1176_SAVEREPLICA Maintain or Create Product Structure
IPPEBAPI_FLO
BAPI_1182_EXISTENCECHECK
BAPI_1182_REPLICATE
BAPI_1182_SAVEREPLICA
IPPEBAPI_GEN iPPE: BAPIs for Generic Engineering Node
BAPI_1197_EXISTENCECHECK Check Existence of Generic Engineering Node
BAPI_1197_REPLICATE Replicate the Generic Engineering Node
BAPI_1197_SAVEREPLICA Create and Change Generic Engineering Node
IPPEBAPI_MPO
BAPI_1220_REPLICATE
BAPI_1220_SAVEREPLICA
IPPEBAPI_PRM
BAPI_1196_EXISTENCECHECK
BAPI_1196_REPLICATE
BAPI_1196_SAVEREPLICA
IPPEBAPI_RES
BAPI_1193_EXISTENCECHECK
BAPI_1193_REPLICATE
BAPI_1193_SAVEREPLICA
K23G Service Function Modules
BAPI_ACC_CO_DOCUMENT_FIND Read CO Document for Manual Actual Postings
K40C CO Actual Postings, Manual
BAPI_ACC_ACTIVITY_ALLOC_CHECK Accounting: Check Activity Allocation
BAPI_ACC_ACTIVITY_ALLOC_POST Accounting: Post Activity Allocation
BAPI_ACC_ACT_POSTINGS_REVERSE Accounting: Reverse CO Documents - Manual Actual Postings
BAPI_ACC_MANUAL_ALLOC_CHECK Accounting: Check Manual Cost Allocation
BAPI_ACC_MANUAL_ALLOC_POST Accounting: Post Manual Cost Allocation
BAPI_ACC_PRIMARY_COSTS_CHECK Accounting: Check Primary Costs
BAPI_ACC_PRIMARY_COSTS_POST Accounting: Post Primary Costs
BAPI_ACC_REVENUES_CHECK Accounting: Check Revenues
BAPI_ACC_REVENUES_POST Accounting: Post Revenues
BAPI_ACC_SENDER_ACTIVITY_CHECK Accounting: Check Sender Activities
BAPI_ACC_SENDER_ACTIVITY_POST Accounting: Post Sender Activities
BAPI_ACC_STAT_KEY_FIG_CHECK Accounting: Check Statistical Key Figures
BAPI_ACC_STAT_KEY_FIG_POST Accounting: Post Statistical Key Figures
KACG Coding Block: FI/LO Part of KACB
BAPI_ACCSERV_CHECKACCASSIGNMT BAPI: Object BUS6001 AccountingServices, Method CheckAccountAssignment
KGR2 External Access to CO Hierarchies
BAPI_ACTIVITYTYPEGRP_ADDNODE Object BUS1115 (Activity Type Group) - Method AddNode
BAPI_ACTIVITYTYPEGRP_CREATE Object BUS1115 (Activity Type Group) - Method Create
BAPI_ACTIVITYTYPEGRP_GETDETAIL Object BUS1115 (Activity Type Group) - Method GetDetail
BAPI_ACTIVITYTYPEGRP_GETLIST Object BUS1115 (Activity Type Group) - Method GetList
KPLB BAPIs: Plan data interface
BAPI_ACT_INPUT_CHECK_AND_POST Activity Type Planning/Price Planning: Formal Parameter Check
BAPI_ACT_INPUT_READ Activity Type Planning/Price Planning: Formal Parameter Check
BAPI_ACT_PRICE_CHECK_AND_POST Activity Type Planning/Price Planning: Formal Parameter Check
BAPI_ACT_PRICE_READ Activity Type Planning/Price Planning: Formal Parameter Check
OPERS_CA Business Object: Other Personal Data
BAPI_ADDITIONALDATA_GETDETAIL Read additional personal data
BAPI_ADDPERSDATA_CHANGE Change additional personal data
BAPI_ADDPERSDATA_CREATE Create additional personal data
BAPI_ADDPERSDATA_DELETE Delete additional personal data
BAPI_ADDPERSDATA_DELIMIT Delimit additional personal data validity period
BAPI_ADDPERSDATA_GETDETAILEDLI Read instances with data
BAPI_ADDPERSDATA_GETLIST Read instances
PADR_AU Business Object AddressEmp (AU)
BAPI_ADDREMPAU_CHANGE ESS Address Change - Australia
BAPI_ADDREMPAU_CREATE ESS Address Create - Australia
BAPI_ADDREMPAU_CREATESUCCESSOR ESS Address Create Successor - Australia
BAPI_ADDREMPAU_GETDETAIL ESS Address Get Detail - Australia
BAPI_ADDREMPAU_GETDETAILEDLIST Read instances with data
BAPI_ADDREMPAU_REQUEST ESS Address Request - Australia
BAPI_ADDREMPAU_SIMULATECREATN ESS Address Simulate Creation - Australia
PADR_CH Business Object: AddressEmp
BAPI_ADDREMPCH_CREATESUCCESSOR Create Subsequent Employee Address Record
BAPI_ADDREMPCH_GETDETAILEDLIST Read Instances with Data
PADR_DE Business Object AddressEmp (DE)
BAPI_ADDREMPDE_CREATESUCCESSOR Create Next Employee Address Record
BAPI_ADDREMPDE_GETDETAILEDLIST Read Instances with Data
PADR_DK Business Object AddressEmp - DK
BAPI_ADDREMPDK_CREATESUCCESSOR Create Subs.Employee Address Record
BAPI_ADDREMPDK_GETDETAILEDLIST Read Instances with Data
PADR_ES Business Object AddrEmpE
BAPI_ADDREMPES_CREATESUCCESSOR Personnel number next record create
BAPI_ADDREMPES_GETDETAILEDLIST Read instances with data
PADR_FR Business Object AddrEmpFR
BAPI_ADDREMPFR_CREATESUCCESSOR Franch Employee Address: Create Next Record
BAPI_ADDREMPFR_GETDETAILEDLIST Read Data Records in Period (French Employee Addresses)
PADR_HK Business object: AddressEmp (HK)
BAPI_ADDREMPHK_CHANGE Change Employee Address (Hong Kong)
BAPI_ADDREMPHK_CREATE Create Employee Address (Hong Kong)
BAPI_ADDREMPHK_CREATESUCCESSOR Create subs.employee address record (Hong Kong)
BAPI_ADDREMPHK_GETDETAIL Read employee address (Hong Kong)
BAPI_ADDREMPHK_GETDETAILEDLIST Read instances with data (Hong Kong)
BAPI_ADDREMPHK_REQUEST Create locked employee address record (Hong Kong)
BAPI_ADDREMPHK_SIMULATECREATE Simulation: Create Employee Address (Hong Kong)
PADR_ID Business Object AddressEmp (ID)
BAPI_ADDREMPID_CHANGE ESS Address Change - Indonesia
BAPI_ADDREMPID_CREATE ESS Address Create - Indonesia
BAPI_ADDREMPID_CREATESUCCESSOR ESS Address Create Successor - Indonesia
BAPI_ADDREMPID_GETDETAIL ESS Address Get Detail - Indonesia
BAPI_ADDREMPID_GETDETAILEDLIST Read instances with data - Indonesia
BAPI_ADDREMPID_REQUEST Create locked employee address record - Indonesia
BAPI_ADDREMPID_SIMULATECREATIO ESS Address Simulate Creation - Indonesia
PADR_IE Business Object AddressEmp - Ireland
BAPI_ADDREMPIE_CREATESUCCESSOR Create subs.employee address record
BAPI_ADDREMPIE_GETDETAILEDLIST Read instances with data
PADR_IT HR Employee Self-Service: Address Italy
BAPI_ADDREMPIT_CREATESUCCESSOR Create personnel number next record
BAPI_ADDREMPIT_GETDETAILEDLIST <Currently not used>
PADR_MY Business Object AddressEmp (MY)
BAPI_ADDREMPMY_CHANGE ESS Address Change - Malaysia
BAPI_ADDREMPMY_CREATE ESS Address Create - Malaysia
BAPI_ADDREMPMY_CREATESUCCESSOR ESS Address Create Successor - Malaysia
BAPI_ADDREMPMY_GETDETAIL ESS Address Get Detail - Malaysia
RCP990
BAPI_1194_REPLICATE_GR
BAPI_1194_SAVEREP_MULTIPLE_GR
RCP993
BAPI_1198_REPLICATE_SR
BAPI_1198_SAVEREP_MULTIPLE_SR
RWCL Interface to Accounting
BAPI_ACC_DOCUMENT_DISPLAY Accounting: Display Method for Follow-On Document Display
BAPI_ACC_DOCUMENT_RECORD Accounting: Follow-on document numbers for source document
SZAM BAPIs f. BOR obj. BUS4003 (AddrContPart)
BAPI_ADDRCONTPART_SAVEREPLICA BAPI for inbound distribution of contact person addresses
Reward points if found helpful ..
Cheers,
Chandra Sekhar. -
BAPI for Open production orders
Hi All,
Any BAPI for open production orders?.... Using BAPI i want to upload open production orders informatiomations.... Please help
Thanks & Regards
SanthoshHi,
Please check the following BAPI,
Goto BAPI tcode, select hierarchical tab
Production orders,ProductionOrder ,ProdOrdConfirmation , RCVPRORDCF and check the BAPIs -
Hi!
Can anyone let me know where to find the bapi for open po and how to use it in my report program.
Thanks in advance.
Note: Mr Anji Reddy vangala has answered me for which iam very much thankful to him, but i need to know about the concerned bapi.
Regards,
Parwez.Hi,
Refer the sample code below which creats PO using BAPI_PO_CREATE1.
Hope this helps your querry.
*& 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> -
1. I want a report which diplays POs & PRs created through MRP & created manually. How?
2. Through Document type we can easily distinguish between the Purchase Requisitions that have been generated through MRP and those created manually. How?
Regards
VSYOu can get the report for req created by MRP/Manually or any other criteria by using transaction ME5A
Use ME5A then from dynamic selection (On Maib screen color button) select the creation indicator by double clicking on it and entr the value B for MRP same way for any other REqs
This will give you the exact reports which you are looking for it so you don;t need to create the new document type for this purpose
rewards the points -
Experts,
I need a BAPI for list of Sales order against which the invoice has not been generated. I need to pass date and bapi shall return list of sales order that are not invoiced.
Thanks
HarshHi Frederic
Sure it does.
Actually I want to send data from SAP to some .net application. I thought using BAPI would make the job easier.
Anyways thanks.
Regards
Harsh -
PS: BAPI For Planned Progress and Actual Progress
Dear All,
Is there any BAPI available for Planned Progress and Actual Progress for PS Project.
Regards,
SohailHi,
Try using this report s_alr_87013532.
Also for planned and actual progress the table is rpsqt. Could not find any bapi for the progress
Regards
Hiren K.Chitalia -
Hi!
I need a BAPI for extract the Vendor Balances and other for load the Vendor Balances.
Do they exist?try to search in Se37
BAPI_AP_ACC_GETBALANCEDITEMS Vendor Account Clearing Transactions in a given Period
BAPI_AP_ACC_GETCURRENTBALANCE Vendor Account Closing Balance in Current Fiscal Year
BAPI_AP_ACC_GETKEYDATEBALANCE Vendor Account Balance at Key Date
BAPI_AP_ACC_GETPERIODBALANCES Posting Period Balances per Vendor Account in Current Fiscal Year
regards
Prabhu -
Open Purchase Orders not considered as requirement for MRP Run
Hi ,
We are facing a issue of Open Purchase orders not appeared in Stock requirements list and also it is not considered as requirement for MRP Run against reservation.
As aresult for a reservation demand of 10 units we are ending with Open POs 10 units and a additional planned order 10 units.
Material Type : ERSA
MRP Type : PD (or VB)
Lot size : EX ( HB if MRP Type is VB)
Could you please throw some light to correct our settings to MRP to consider Open POs?
SaravananCan you check to see if there is a re-order point set up for this materia? That could be causing the problem too.
-
Function modules or BAPI for posting plan costs for WBS Element
Hi all,
Does anyone know, whether there exists a function module or BAPI for posting plan costs to a WBS Element? K_COSTS_PLAN_PS does not work, because RKP1 is not allowed.
Greetingscheck
BAPI_COSTACTPLN_POSTACTINPUT Activity Input Planning: Posting
BAPI_COSTACTPLN_POSTACTOUTPUT Activity/Price Planning: Posting
BAPI_COSTACTPLN_POSTKEYFIGURE Stat. Key Figure Planning: Postings
BAPI_COSTACTPLN_POSTPRIMCOST Primary Cost Planning: Postings
BAPI_PDTRANSCO_POSTPRIMCOST Transfer of Planning Data: Post Primary Costs
K40C CO Actual Postings, Manual
BAPI_ACC_PRIMARY_COSTS_POST Accounting: Post Primary Costs
BAPI_COPAACTUALS_POSTCOSTDATA BAPI Operating Concern: Post Costing-Based Actua
BAPI_PRIM_COST_CHECK_AND_POST Primary Costs: Formal Parameter Check
S@meer
Maybe you are looking for
-
Exception in ESB Header Functions (ehdr:getRequestHeader)
Hi, I was working on the context based routing in the ESB. My scenario is a simple File to File scenario where I want to make some changes in the Filter Expressions in the Routing service part. I want to include the Header functions in order to route
-
WebService approach - HTTP limitation
Hello, This is a PI architectural question, rather than a PI development one. One of the scenarios to be used contemplate an WebService approach but I've been told that there are some technical limitations in using this approach. Two of them are well
-
Full OS backup and restoration
I have a Win 2012 R2 server installed on a Dell PE730 box. The box is highly critical and there are lot of configurations in that server that I want to create a full backup and incase of failure of the box, the backup should be useful to restore the
-
Display a default subsequence when openning a sequence file in the TestStand editor
Is there a way to set the default sequence displayed when openning up a sequence file? Seems that the steps for MainSequence are typically displayed first when openning an existing sequence. How do I set it to display another subsequence I created wh
-
Unlike many posts I am able to install ADE 2.0 on a Windows 7 32 bit computer with all updates. However whenever I try to run it opens but any click will crash the program.I have uninstalled and reinstalled and still get the same crash.