Document Chekc in through BAPI Error
Dear all,
I am using bapi BAPI_DOCUMENT_CHECKIN2 to Check in Dcument into content server but i am getting error as
Error while checking in and storing: C:\DOCUMENTS AND SETTINGS\ADMINISTRATOR\DESKTOP\DD.doc
message no is 253
Please guide me.
thanx
harish.
hi,
i think u did not configure the defualt as Front end computer.
check, data carrier type....should be front end computer..
and then run Bapi
Benakaraj
Similar Messages
-
Problem while posting FI document through BAPI - Multiple Exchange Rates
I am able to post FI document with multiple exchange rates for the same currency using FB01. But, when I try to post the same document details using BAPI_ACC_DOCUMENT_POST , it throws an error F5 701 - Inconsistent Rate for Currency XXX .
How can we avoid this error while posting through BAPI ?
Thanks & Regards,
NidhiHi Nidhi,
Value range
The field CURR_TYPE (currency type) describes the role played by a
currency in the SAP System.
The currency type can take on the following values, for example:
o 00 Transaction currency
o 10 Company code currency
o 20 Controlling area currency
o 30 Group currency
o 40 Hard currency
o 50 Index-based currency
o 60 Global company currency
If an entry is not made in the field CURR_TYPE, the default value "00"
is retained.
If only one data record is transferred in transaction currency for each
line item, the field CURR_TYPE does not need to be filled out. If
several data records are transferred for each line item, the currency
type must be entered for each record.
If the parameter CurrencyAmount is filled with the currency fields,
a complete document check including characteristics and value
components of profitability analysis (CO-PA). Otherwise, the account
assignment objects are checked.
Check the BAPI documentation SE37.
Regards,
Boobalan Suburaj -
Need Code For PO-GR through MiGO for multiple documents through BAPI
Hi All
Im using BAPI_GOODSMVT_CREATE to post goods for PO-GR.
When im posting multiple documents its giving error.
When im posting individually, it's working fine.
Please send me the code for PO-GR through BAPI.
Urgently required.
Regards,
SImha.Is this not working???
BAPI_GOODSMVT_CREATE to post Goods Movement
The following is an abap program making used of the BAPI function BAPI_GOODSMVT_CREATE to do Goods Receipts for Purchase Order after importing the data from an external system.
BAPI TO Upload Inventory Data
GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order
02 - MB31 - Goods Receipts for Prod Order
03 - MB1A - Goods Issue
04 - MB1B - Transfer Posting
05 - MB1C - Enter Other Goods Receipt
06 - MB11
Domain: KZBEW - Movement Indicator
Goods movement w/o reference
B - Goods movement for purchase order
F - Goods movement for production order
L - Goods movement for delivery note
K - Goods movement for kanban requirement (WM - internal only)
O - Subsequent adjustment of "material-provided" consumption
W - Subsequent adjustment of proportion/product unit material
report zbapi_goodsmovement.
parameters: p-file like rlgrap-filename default
'c:\sapdata\TEST.txt'.
parameters: e-file like rlgrap-filename default
'c:\sapdata\gdsmvterror.txt'.
parameters: xpost like sy-datum default sy-datum.
data: begin of gmhead.
include structure bapi2017_gm_head_01.
data: end of gmhead.
data: begin of gmcode.
include structure bapi2017_gm_code.
data: end of gmcode.
data: begin of mthead.
include structure bapi2017_gm_head_ret.
data: end of mthead.
data: begin of itab occurs 100.
include structure bapi2017_gm_item_create.
data: end of itab.
data: begin of errmsg occurs 10.
include structure bapiret2.
data: end of errmsg.
data: wmenge like iseg-menge,
errflag.
data: begin of pcitab occurs 100,
ext_doc(10), "External Document Number
mvt_type(3), "Movement Type
doc_date(8), "Document Date
post_date(8), "Posting Date
plant(4), "Plant
material(18), "Material Number
qty(13), "Quantity
recv_loc(4), "Receiving Location
issue_loc(4), "Issuing Location
pur_doc(10), "Purchase Document No
po_item(3), "Purchase Document Item No
del_no(10), "Delivery Purchase Order Number
del_item(3), "Delivery Item
prod_doc(10), "Production Document No
scrap_reason(10), "Scrap Reason
upd_sta(1), "Update Status
end of pcitab.
call function 'WS_UPLOAD'
exporting
filename = p-file
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = pcitab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
OTHERS = 6
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.
gmhead-pstng_date = sy-datum.
gmhead-doc_date = sy-datum.
gmhead-pr_uname = sy-uname.
gmcode-gm_code = '01'. "01 - MB01 - Goods Receipts for Purchase Order
loop at pcitab.
itab-move_type = pcitab-mvt_type.
itab-mvt_ind = 'B'.
itab-plant = pcitab-plant.
itab-material = pcitab-material.
itab-entry_qnt = pcitab-qty.
itab-move_stloc = pcitab-recv_loc.
itab-stge_loc = pcitab-issue_loc.
itab-po_number = pcitab-pur_doc.
itab-po_item = pcitab-po_item.
concatenate pcitab-del_no pcitab-del_item into itab-item_text.
itab-move_reas = pcitab-scrap_reason.
append itab.
endloop.
loop at itab.
write:/ itab-material, itab-plant, itab-stge_loc,
itab-move_type, itab-entry_qnt, itab-entry_uom,
itab-entry_uom_iso, itab-po_number, itab-po_item,
pcitab-ext_doc.
endloop.
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gmhead
goodsmvt_code = gmcode
TESTRUN = ' '
IMPORTING
goodsmvt_headret = mthead
MATERIALDOCUMENT =
MATDOCUMENTYEAR =
tables
goodsmvt_item = itab
GOODSMVT_SERIALNUMBER =
return = errmsg
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:/ mthead-mat_doc, mthead-doc_year.
perform upd_sta.
endif.
endif.
FORM UPD_STA *
form upd_sta.
loop at pcitab.
pcitab-upd_sta = 'X'.
modify pcitab.
endloop.
call function 'WS_DOWNLOAD'
exporting
filename = p-file
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = pcitab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
OTHERS = 6
endform.
*--- End of Program
REgards,
Ravi -
Error in Uploading of Documents into Portal through KM
Hi All,
I Am new to KM, i am uploading the Word Documents into Portal through KM, this is the path : Content Administrator->KM Content->Documents--->
here i am creating one folder after that i am uploading one Word Document into through Folder--->Upload, but when i am clicking on that uploaded document it shows Portal Runtime error....This is my problem....
Could u please solve my problem....for me this is very urgent.....
Thanks and Regards,
Abhiram Choudary.Hi Abhiram,
Please check it the link to the file uploaded file is ok, in order to make sure that there is a problem with the upload. The link should look like: <Protocol>://<Portal_Server_Name>:<Port>/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/<your_Folder>/<your_wordfile_name>.doc
or
<Protocol>://<Portal_Server_Name>:<Port>/irj/go/km/docs/documents/<your_Folder>/<your_wordfile_name>.doc
If it's that's not the case you might need to change the configuration of the <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/7d/236cfa17034a37a439dc392ec59eb0/content.htm">URL Generator Service</a>. Perform the steps indicated under "Activities".
Hope this helps,
Robert -
How to update Assignment field in Accounting Document through BAPI ?
I need to change Assignment field in already posted accounting document through bapi or some other automatic method. Please tell me exactly which bapi I should use and how can I pass the changed assignment field?
Hey,
I couldnt find any BAPIs which update an accounting document. I think the safest way is to record FB02 and use BDC/Call Transaction.
-Kiran
*Please reward useful answers -
How to create shipment cost document through BAPI?
Hi SAP Guru,
My requirement is to create shipment cost document through BAPI.
Is there any standard BAPI to create Shipment cost documents? If any buddy no please help me out.I am in client place i have find out the solution..
Thanks & Regards,
Pankaj SinhaHi Pankaj,
See the following link for more help.
IDOC/BAPI for changing Shipment cost number/document
Regards -
Freight vendor updation in GR document through BAPI
Dear All
In my system we are creating Goods Receipt in background through *BAPI BAPI_GOODSMVT_CREATE*. In my PO we have entered freight condition FRB1 for that PO line item and assigned a vendor code different from material vendor. For this freight condition FRB1 in the configuration we have maintained in Control Data 2 field Vendor in GR as 2 ( i.e. Entry always possible). This will help us to change freight vendor different from freight vendor maintained in PO line item.
Now my query is that how can I achieve this through BAPI BAPI BAPI_GOODSMVT_CREATE when I am creating GR in background. In which field of BAPI should we pass the freight vendor at the time of GR creation.
Regards
Satish KumarHi Satish,
With standard SAP this is not Possible
As indicated in the attached note 356665, the field SUPPL_VEND has no
function. Please, have a look at this note for further information.
In dialog (with MB01 or MIGO) you have the possibility to enter another
freight vendor different than the vendor in your purchase order (or your
scheduling agreement) as long as you have, in your purchasing condition
type, "Vendor in GR" (V_T685A-BNKWE) maintained with the appropiate
value. Then, by posting the Goods Receipt, you will update EKBZ with
this new freight vendor.
Unfortunately in the standard system this functionality is not available
when working with the BAPI BAPI_GOODSMVT_CREATE or with the Idoc
WMMBID02.
There is no customizing setting or tool that you could use inside the
standard system to change it. -
Bapi error in BAPI_GOODSMVT_CREATE
HI friends ,
i am using BAPI_GOODSMVT_CREATE for migo using movement type 101 . but it is always throughing
same error 'Goods movement not possible with mvmt type 101' . i am unable to understand the actual cause of this error . what should i do shall we have to use any other bapi for this . plz help me regarding this .
Thanks ,
Amit RanjanHI FRIEND ,
thanks for your prompt reply . i have used goodsmvt_item-mvt_ind = 'B' but the error is still there .
i am sending u my whole program for better understanding .
*& Report ZBAP
REPORT ZBAP.
parameters: xpost like sy-datum default sy-datum.
data: begin of gmhead.
include structure bapi2017_gm_head_01.
data: end of gmhead.
data: begin of gmcode.
include structure bapi2017_gm_code.
data: end of gmcode.
data: begin of mthead.
include structure bapi2017_gm_head_ret.
data: end of mthead.
data: begin of itab occurs 100.
include structure bapi2017_gm_item_create.
data: end of itab.
data: begin of errmsg occurs 10.
include structure bapiret2.
data: end of errmsg.
data: wmenge like iseg-menge,
errflag.
data: begin of pcitab occurs 100,
ext_doc(10), "External Document Number
mvt_type(3), "Movement Type
doc_date(8), "Document Date
post_date(8), "Posting Date
plant(4), "Plant
material(18), "Material Number
qty(13), "Quantity
recv_loc(4), "Receiving Location
issue_loc(4), "Issuing Location
pur_doc(10), "Purchase Document No
po_item(3), "Purchase Document Item No
del_no(10), "Delivery Purchase Order Number
del_item(3), "Delivery Item
prod_doc(10), "Production Document No
scrap_reason(10), "Scrap Reason
upd_sta(1), "Update Status
end of pcitab.
call function 'WS_UPLOAD'
exporting
filename = 'c:\migo.txt'
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = pcitab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
OTHERS = 6
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.
gmhead-pstng_date = sy-datum.
gmhead-doc_date = sy-datum.
gmhead-pr_uname = sy-uname.
gmcode-gm_code = '01'. "01 - MB01 - Goods Receipts for Purchase Order
loop at pcitab.
itab-move_type = pcitab-mvt_type.
itab-mvt_ind = 'B'.
itab-plant = pcitab-plant.
itab-material = pcitab-material.
itab-entry_qnt = pcitab-qty.
itab-move_stloc = pcitab-recv_loc.
itab-stge_loc = pcitab-issue_loc.
itab-po_number = pcitab-pur_doc.
itab-po_item = pcitab-po_item.
concatenate pcitab-del_no pcitab-del_item into itab-item_text.
itab-move_reas = pcitab-scrap_reason.
append itab.
endloop.
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gmhead
goodsmvt_code = '03'
TESTRUN = ' '
IMPORTING
goodsmvt_headret = mthead
MATERIALDOCUMENT =
MATDOCUMENTYEAR =
tables
goodsmvt_item = itab
GOODSMVT_SERIALNUMBER =
return = errmsg .
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:/ mthead-mat_doc, mthead-doc_year.
endif.
endif.
PLZ check it and telll me where is the fault .
Thanks ,
Amit Ranjan -
Is it possible to get document NO. create by bapi BAPI_COPAACTUALS_POSTCOST
Hello experts,
in my ABAP program design, i want to trans data through the bapi:BAPI_COPAACTUALS_POSTCOSTDATA to trans data from a SCV file to the SAP CO-PA, the user want to see the error infor if the BAPI does'nt success, if the BAPI is success, we have to show the document Number created by the BAPI BAPI_COPAACTUALS_POSTCOSTDATA.
and the problem is :is it possible to see the Document Number if the BAPI is success?
I searched thr parameters of the BAPI ,but find no parameter to export the Document number created by the bapi,
how could i realise the requirement ?
do Ihave to realise it through the BDC?
hope to receive your response, and wish you have a good day!
Best regards!
Carl!Hi,
unfortunately, this BAPI does not return CO document number. If you need it then you need to write BDC for KE21.
Cheers -
Material Master Update through BAPI - Follow up material not updated
Hi Experts,
I am updating the material master through a custom transaction using the BAPI 'BAPI_MATERIAL_SAVEDATA'. Rest of the fields are updating correctly except for discontinuation ind., effective out date & follow-up material.
When I try to update it through MM02 it is working fine. However, when I pass the same data through BAPI it is throwing an error message that 'the material XXXXXX does not exist or is not activated'.
Please advice.
Thanks & Regards,
Ashu AroraSome more fields need to be updated along with the discont. indicator. Now working fine.
-
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...
-
F-28 Post incoming payment through BAPI with Clearing
Hi Gurus
I have a requirement to post Customer incoming payment through BAPI, I have seen some post where using
BAPI_ACC_DOCUMENT_POST , we can post on account and later using f-32 we can clear. but there s some limitation doing that.
In f-28 residual line items also got generated for short or excess payment. There is a problem for residual item posting also.
If residual amount belongs to more than one Profit Center then GL currency view and Local Currency view is also mismatching.
Is is possible to clear customer line item also at the time of posting through BAPI.
If any one implemented BAPI or any automatic process to post F-28 please share your experience and challenges.
Thanks in advance
Subrata SarkarHi
There could be multiple approaches to this depending on what you want to achieve. If you just want to uplaod the documents, than the BAPI you mentioned could be the right approach. If however, you have fixed criterion for cash application for open items, you can probably look at a BDC to do the clearing.Once the BDC is recorded work with your ABAP colleague to write this up in a custom transaction. This is particualrly useful if you have more items to clear against an incoming payment.
regards
Sanil Bhandari -
Need to Post Components in Production Order in MB1A through BAPI as Planned Good Issue
Hi ,
I have created a Program to upload data s for MB1A through BDC , it works fine, but for huge data s it takes more time. alternatively created one more Program which updates through BAPI Function Module "BAPI_GOODSMVT_CREATE". It works fine , but one issue noted, after posting through Function Module , components are posted as Unplanned Goods Issue. I need to post the components as " Planned Goods Issue" instead of "Unplanned Goods Issue " . This can viewed through Tcode : C003
Below are the inputs passed for BAPI Function Moduel
**&------Header Contents of bapi Upload-------------------&*
header-pstng_date = sy-datum. " Posting date
header-doc_date = sy-datum. " Document Date
header-header_txt = '000001002280'. " Header text
header-pr_uname = sy-uname. " User Name
header-ref_doc_no = '000001002280'. " Header Ref. Doc. No.
CONCATENATE sy-uname sy-uzeit c_method INTO header-ref_doc_no_long SEPARATED BY '-'. " Refer Text
*Item Data
wa_item-material = '000000000010000800'. "Material
wa_item-plant = '3910'. "Plant
wa_item-stge_loc = 'WIP'. "Storage Location
wa_item-move_type = '261'. "Movement Type
wa_item-entry_qnt = '1'. "Quantity
wa_item-entry_uom = 'PC'. "Unit
*wa_item-res_item = 1. "Reservation Item
*wa_item-reserv_no = " Reservation Number
wa_item-batch = '0000011027'. "Batch No
*wa_item-mvt_ind = 'F'. "Movement Indicator
*wa_item-stck_type = 'F'. "Stock Type
wa_item-orderid = '000001002260'. "Order ID
wa_item-prod_date = SY-DATUM.
*wa_item-GL_Account = '610000'. "GL Account
*TRANSLATE wa_item-batch TO UPPER CASE.
*APPEND wa_item TO it_item.
c_code = '03'.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = header
goodsmvt_code = c_code
TABLES
goodsmvt_item = it_item
goodsmvt_serialnumber = it_sno
return = return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
commit work and wait.
Even i tried to pass "Movement Indicator , GL Account etc" , Still not able to fix the issue. Can anyone suggest how to post the Production Order components as "Planned Goods Issue". I am not sure any other values to be password.
BR,
MuraliI have made something like your :
* Alimtentation de la BAPI de mouvement de stock MM.
move : sy-datum to ls_header-pstng_date ,
sy-datum to ls_header-doc_date ,
* Indique le code mouvement
'03' to lw_code. " 03 normalement, mais je veux que ca plante
loop at lt_ltap
into ls_ltap.
move : ls_ltap-matnr to ls_item-material ,
ls_ltap-werks to ls_item-plant ,
ls_ltap-lgort to ls_item-stge_loc ,
'261' to ls_item-move_type ,
ls_ltap-vsolm to ls_item-entry_qnt ,
ls_ltap-meins to ls_item-entry_uom ,
i_ltak_vb-benum to ls_item-orderid ,
i_ltak_vb-rsnum to ls_item-reserv_no ,
ls_ltap-rspos to ls_item-res_item ,
ls_ltap-rsart to ls_item-res_type.
append ls_item to lt_item.
clear ls_item.
endloop.
I have to put the reservation number to have it works.
Fred -
Sales order uploading through bapi
hi
i want to upload sales order to bapi pls give the code and i also error handling through bapi
regards
A.KHi Awadhesh,
pls look at this link you will get a clear idea and the code.
http://abaplovers.blogspot.com/2008/02/bapi-sales-order-create-code.html
Happy to help you.
Regards,
Viveks -
The document has expected extension (.RPT) - error
Hi All,
We have come across an issue while opening a Crystal report. Below are the details of the same: -
Error Message: - "This document has the expected file extension (.RPT), but seems to be corrupted. If this report used to work, try opening it with a different version of Crystal Reports and if that still does not work, please contact your administrator. "
Report developed in:- CR XIR2 SP2
Trying to open the report in :- CR XI R1 base build.
All other reports can be opened; however this particular report cannot be opened. We have re-created the report from scratch and still the same issue.
Can some one please put some light on how we can over come this issue? It is not possible for me to upload the report here for security reasons.
Any help would be highly appreciated.
Regards.Hi Debi,
Thank you for your reply!
As mentioned earlier, we have already re-created the report and have also gone through the error message guide from where you have supplied the information.
What we intend to know is, if there are any known issues with either formulas or any report object (incompatability between CR XIR1 and R2) which can possibily cause this issue to surface even on a newly recreated report.
Google and SDN did not retrun much help on this aspect.
Regards.
Maybe you are looking for
-
MIGO error 'Purchase Order does not contain a confirmation control key'
Hi, while posting GR to a PO i am getting an error ' Purchase order XXXXXXXXX does not contain a confirmation control key' it is true that i have not defined any confirmation control key in PO, Aknowled rerd checkbox is also not ticked Still why this
-
Is it possible to have a fast web access pdf load only a specified number of pages, at least to start with? Say the top/first ten pages of a larger pdf? I have a web site which displays a multi page pdf, which is regularly being added to; new pages
-
What kind of cord do I buy to hook up my MacPro to my television monitor? And where does it plug in?
-
I have instaled Mozila Firefox on a new Dell laptop witch runs Windows Xp Profesional (I have Administrator rights) and when i try to run Mozila Firefox i get the message C:/Program Files/Mozila Firefox/ firefox.exe The handle is invalid. I also trye
-
Hi I'm hoping for some advice as I'm newish to managing servers and not exactly an IT head (but it's my job!). Running Snow Leopard Server (up to date version, 10.6.7) on a Mac Pro tower (few years old now - dual Intel 2.66 I think). It has two 1 TB