Bapi for transaction 'MB1C' -'Enter other goods receipt...'
Hi,
Please suggest the BAPI for the transaction 'MB1C'.
thanks
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
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header =
goodsmvt_code =
* TESTRUN = ' '
IMPORTING
goodsmvt_headret =
* MATERIALDOCUMENT =
MATDOCUMENTYEAR =
tables
goodsmvt_item =
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.
move errmsg-message to i_msg1.
append i_msg1.
move errmsg-message to i_msg2.
append i_msg2.
endloop.
if errflag is initial.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
endif.
Similar Messages
-
Enter Other Goods Receipt - MB1C Error
Dear Friends:
When working on Enter Other Goods Receipt -I entered Material,Qty,UnE and pressed enter, I got the error
'Account determination for entry SANO GBB ____ ZOB 3000 not possible' and
'No stock posting possible for this material'.
How to overcome the problem? Please advise.
Regards
MSReddySridhar,
Just check in OBYC tranc. whether for tranc key <b>GBB</b>, you have maintained the combination of <b>valuation grouping code</b> you are using, <b>general modifier</b> ( <b>ZOB</b>) and <b>valuation class</b> ( <b>3000</b>) and the G/L accounts.
If not, please maintain the same.
Enjoy,
Vidyadhar. -
Need BAPI for MIGO to create a Goods Receipt against PO &Outbound Delivery
Hi Friends,
GRNs (Good receipt notifications) created in DHL (Non SAP system) will need to be communicated to SAP.
I need to post goods receipt using input data in MIGO. Is there any BAPI that i can use.The requirement is like below:
PO number field in output file is checked against entries in EKKO-EBELN, if a match is found the GR is posted against a Purchase Order otherwise LIKP-VBELN is checked and if a match is found GR is posted against an Outbound Delivery.
If PO Number = EKKO-EBELN GR against Purchase Order
= LIKP-VBELN GR against Outbound Delivery
Based on the above condition I need to create a Goods Receipt.
Could you please tell me the GM code, movement types and the required fields to be passed for the BAPI?
The fields available are with us are...
Header text. - Bill of Lading- Posting Date-Quantity- UOM--- Vendor Batch / Batch / Serial No --- PO Number or Delivery Number SLED
Are these fields sufficient for doing MIGO with the BAPI or do we require more fields???
Please provide sample code if possible.
Waiting for replies,
Thanks and Regards,
SudhaHi Friends,
GRNs (Good receipt notifications) created in DHL (Non SAP system) will need to be communicated to SAP.
I need to post goods receipt using input data in MIGO. Is there any BAPI that i can use.The requirement is like below:
PO number field in output file is checked against entries in EKKO-EBELN, if a match is found the GR is posted against a Purchase Order otherwise LIKP-VBELN is checked and if a match is found GR is posted against an Outbound Delivery.
If PO Number = EKKO-EBELN GR against Purchase Order
= LIKP-VBELN GR against Outbound Delivery
Based on the above condition I need to create a Goods Receipt.
Could you please tell me the GM code, movement types and the required fields to be passed for the BAPI?
The fields available are with us are...
Header text. - Bill of Lading- Posting Date-Quantity- UOM--- Vendor Batch / Batch / Serial No --- PO Number or Delivery Number SLED
Are these fields sufficient for doing MIGO with the BAPI or do we require more fields???
Please provide sample code if possible.
Waiting for replies,
Thanks and Regards,
Sudha -
Document type assigned for other goods receipts(MB1C)is WA why?
Hi,
Document type assigned for other goods receipts(MB1C)is WA why?
ThanksDocument type for Goods Receipt is WE but I found in standard(Default) system it is assigned WA?
Can anyone help me on this?
Thanks -
BDC program for Other Goods receipts
Hi all,
I need BDC program for Other goods receipts,
I have data in excel like material, batch id, qty, actual width, length, plant etc. i want to upload this in one short based on the movement type.
Thanks in advance.
ShankarHi MP Shankar,
This is a sample BDC program .Use the format to develop your own BDC program.First record your trasnaction and use that recorded program here.Pass your filename here.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_ifile TYPE dxfile-filename.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-002.
PARAMETERS: p_sess RADIOBUTTON GROUP g3 "create session
DEFAULT 'X' USER-COMMAND bdc,
p_ctu RADIOBUTTON GROUP g3. "call transaction
SELECTION-SCREEN END OF BLOCK b3.
DATA : BEGIN OF itab OCCURS 0,
str TYPE string,
END OF itab,
l_file TYPE string,
t_bdcdata TYPE STANDARD TABLE OF bdcdata,
wa_bdcdata LIKE LINE OF t_bdcdata.
AT SELECTION SCREEN ON VALUE REQUEST
Value request for the filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ifile.
PERFORM help_input_file.
START-OF-SELECTION.
CLEAR l_file.
l_file = p_ifile.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_file
filetype = 'ASC'
TABLES
data_tab = itab
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.
*Start new session
IF p_sess = 'X'.
PERFORM bdc_open.
ENDIF.
LOOP AT itab.
PERFORM creat_batch_input.
PERFORM bdc_insert.
IF p_ctu = 'X'.
CALL TRANSACTION 'SE38' USING t_bdcdata MODE 'A'.
ENDIF.
ENDLOOP.
IF p_sess = 'X'.
PERFORM bdc_close .
ENDIF.
*& Form bdc_open
text
--> p1 text
<-- p2 text
FORM bdc_open .
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = 'ZMUK'
user = sy-uname
EXCEPTIONS
client_invalid = 1
destination_invalid = 2
group_invalid = 3
group_is_locked = 4
holddate_invalid = 5
internal_error = 6
queue_error = 7
running = 8
system_lock_error = 9
user_invalid = 10
OTHERS = 11.
ENDFORM. " bdc_open
*& Form creat_batch_input
text
--> p1 text
<-- p2 text
FORM creat_batch_input .
use your own recorded program here.
PERFORM bdc_dynpro USING 'SAPLWBABAP' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=STRT'.
PERFORM bdc_field USING 'RS38M-PROGRAMM'
itab-str.
PERFORM bdc_field USING 'RS38M-FUNC_EDIT'
'X'.
PERFORM bdc_dynpro USING 'SAPLSLVC_FULLSCREEN' '0500'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=&F03'.
PERFORM bdc_dynpro USING 'SAPLWBABAP' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
PERFORM bdc_field USING 'RS38M-PROGRAMM'
itab-str.
PERFORM bdc_field USING 'RS38M-FUNC_EDIT'
'X'.
ENDFORM. " creat_batch_input
*& Form bdc_insert
text
--> p1 text
<-- p2 text
FORM bdc_insert .
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = 'SE38'
TABLES
dynprotab = t_bdcdata
EXCEPTIONS
internal_error = 1
not_open = 2
queue_error = 3
tcode_invalid = 4
printing_invalid = 5
posting_invalid = 6
OTHERS = 7.
ENDFORM. " bdc_insert
*& Form bdc_dynpro
text
-->P_0168 text
-->P_0169 text
FORM bdc_dynpro USING p_program TYPE any
p_dynpro TYPE any.
CLEAR wa_bdcdata.
wa_bdcdata-program = p_program.
wa_bdcdata-dynpro = p_dynpro.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO t_bdcdata.
ENDFORM. " bdc_dynpro
*& Form bdc_field
text
-->P_0179 text
-->P_0180 text
FORM bdc_field USING p_fnam TYPE any
p_fval TYPE any.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = p_fnam.
wa_bdcdata-fval = p_fval.
CONDENSE wa_bdcdata-fval.
APPEND wa_bdcdata TO t_bdcdata.
ENDFORM. " bdc_field
*& Form bdc_close
text
--> p1 text
<-- p2 text
FORM bdc_close .
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
not_open = 1
queue_error = 2
OTHERS = 3.
ENDFORM. " bdc_close
*& Form help_input_file
text
--> p1 text
<-- p2 text
FORM help_input_file .
DATA: lt_file_table TYPE filetable,
la_file_table LIKE LINE OF lt_file_table,
l_rc TYPE i,
l_pcdsn TYPE cffile-filename.
REFRESH lt_file_table.
CLEAR la_file_table.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
CHANGING
file_table = lt_file_table
rc = l_rc.
READ TABLE lt_file_table INTO la_file_table INDEX 1.
l_pcdsn = la_file_table-filename.
MOVE l_pcdsn TO p_ifile.
ENDFORM. " help_input_file -
Hi all
i want bdc program and flat file structure for transaction MB1C to upload stock.
If anyone have then please send me at [email protected]
Its urgent.
ThanksHi
use the BAPI
BAPI_GOODSMVT_CREATE
see the code:
REPORT ZRICH_0001 .
Structures for BAPI
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 = '04'. " MB1A
Write 971 movement to table
CLEAR GM_ITEM.
MOVE '412' TO GM_ITEM-MOVE_TYPE .
MOVE 'Q' TO GM_ITEM-SPEC_STOCK.
MOVE '3800533484' TO GM_ITEM-MATERIAL.
MOVE '1' TO GM_ITEM-ENTRY_QNT.
*MOVE 'PC' TO GM_ITEM-ENTRY_UOM.
MOVE '1060' TO GM_ITEM-PLANT.
MOVE '0007' TO GM_ITEM-STGE_LOC.
*MOVE '0901' TO GM_ITEM-MOVE_REAS.
MOVE 'P203601001' TO GM_ITEM-WBS_ELEM.
MOVE 'P203601001' TO GM_ITEM-VAL_WBS_ELEM.
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.
WRITE:/ GM_RETMTD.
LOOP AT GM_RETURN.
WRITE:/ GM_RETURN.
ENDLOOP.
Reward points if useful
Regards
Anji -
BAPI for Transaction VA01?
How to Develope an interface program to upload the sales order data from legacy system to SAP using BAPI for Transaction VA01.Explain me clearly?
VA01:
BAPI_SALESORDER_CREATEFROMDAT1
BAPI_SALESORDER_CREATEFROMDAT2
steps for bapi creation
STEP 1 - Define a structures for the BAPI
In this step a structures for the parameters and tables of the function module used for the BAPI are defined.
Use Data type -> Structure
Define the following structures:
ZBAPI_ORDER_STATUS_IMPORT which contains the following fields:
ORDERID Order number (Keyfield)
SPRAS Language
ExcludeInactive - Checkbox - Exclude inactive status
ZBAPISTAT:
STEP 2 - Write Function Module
Important notes:
Each BAPI must have its own function group.
Under the attributes tab remember to select Processing Type Remote Enabled module, otherwise the function module cannot be invoked via RFC and used as a BAPI
Import/Export parameters can only be BY VALUE for an RFC enabled function module
We are only creating one BAPI in this example, but you can create related BAPIs in the same function pool, so they will be able to share global data.
Code
Notes:
The subroutine SET_RETURN_MESSAGE is a standard routine used for BAPIs that use the BAPIRETURN structure
In form Z_BAPI_GET_ORDER_SYSTEM_STATUS there is a test IF 1 = 2. If the test is true a message is displayed. The condition will obviously never be true, and we will never want to display a message in a BAPI. The reason why it is included is, that it create a reference for the message, so that the WHERE USED functionality can be used for the message. This is the SAP standard way to handle it, copied from the Company Code GetList BAPI.
INCLUDE LZBAPISTATUSUXX
THIS FILE IS GENERATED BY THE FUNCTION LIBRARY. *
NEVER CHANGE IT MANUALLY, PLEASE! *
INCLUDE LZBAPISTATUSU02.
"Z_BAPI_GET_ORDER_SYSTEM_STATUS
INCLUDE LZBAPISTATUSTOP - Global data
FUNCTION-POOL ZBAPISTATUS. "MESSAGE-ID Z3
Types:
begin of Type_tj02t,
istat like tj02t-istat,
txt04 like tj02t-txt04,
txt30 like tj02t-txt30,
end of type_tj02t.
DATA:
Declarations for TABLE parameter
T_BAPISTAT like ZBAPISTAT occurs 0,
G_BAPISTAT like ZBAPISTAT,
Table for object texts
t_tj02t type type_tj02t occurs 0,
g_tj02t type type_tj02t.
Structure for return messages
DATA:
BEGIN OF MESSAGE,
MSGTY LIKE SY-MSGTY,
MSGID LIKE SY-MSGID,
MSGNO LIKE SY-MSGNO,
MSGV1 LIKE SY-MSGV1,
MSGV2 LIKE SY-MSGV2,
MSGV3 LIKE SY-MSGV3,
MSGV4 LIKE SY-MSGV4,
END OF MESSAGE.
INCLUDE LZBAPISTATUSF01 - Subroutines
***INCLUDE LZBAPISTATUSF01 .
*& Form SET_RETURN_MESSAGE
This routine is used for setting the BAPI return message.
The routine is a standard routine for BAPIs that handles the message
structure for the BAPIRETURN structure. It has been copied from the
BAPI Company Code Getlist
-->P_MESSAGE text
<--P_RETURN text
form SET_RETURN_MESSAGE USING VALUE(P_MESSAGE) LIKE MESSAGE
CHANGING P_RETURN LIKE BAPIRETURN.
CHECK NOT MESSAGE IS INITIAL.
CALL FUNCTION 'BALW_BAPIRETURN_GET'
EXPORTING
TYPE = P_MESSAGE-MSGTY
CL = P_MESSAGE-MSGID
NUMBER = P_MESSAGE-MSGNO
PAR1 = P_MESSAGE-MSGV1
PAR2 = P_MESSAGE-MSGV2
PAR3 = P_MESSAGE-MSGV3
PAR4 = P_MESSAGE-MSGV4
LOG_NO = ' '
LOG_MSG_NO = ' '
IMPORTING
BAPIRETURN = P_RETURN
EXCEPTIONS
OTHERS = 1.
endform. " SET_RETURN_MESSAGE
FUNCTION Z_BAPI_GET_ORDER_STATUS
FUNCTION z_bapi_get_order_system_status.
""Local interface:
*" IMPORTING
*" VALUE(I_AUFNR) TYPE AUFNR
*" VALUE(I_SPRAS) TYPE SPRAS DEFAULT SY-LANGU
*" VALUE(I_EXCLUDEINACTIVE) TYPE CHAR1 OPTIONAL
*" EXPORTING
*" VALUE(RETURN) TYPE BAPIRETURN
*" TABLES
*" T_BAPISTAT STRUCTURE ZBAPISTAT
DATA:
l_aufnr LIKE afko-aufnr,
l_objnr LIKE jest-objnr.
Check if order exists
SELECT SINGLE aufnr
FROM afko
INTO l_aufnr
WHERE aufnr = BAPI_ORDER_STATUS_IMPORT-orderid.
IF sy-subrc NE 0.
CLEAR message.
message-msgty = 'E'.
message-msgid = 'Z3'.
message-msgno = '000'.
message-msgv1 = BAPI_ORDER_STATUS_IMPORT-orderid.
PERFORM set_return_message USING message
CHANGING return.
IF 1 = 2.
The only reason to include this statement, that will obviously
never execute, is that it will create a referecence so that you
can find out where a particular message is being used. This
functionality is used by the BAPIs programmed by SAP
MESSAGE e000(z3).
ENDIF.
ENDIF.
CHECK return IS INITIAL.
Read order status
CONCATENATE 'OR' BAPI_ORDER_STATUS_IMPORT-orderid INTO l_objnr.
IF BAPI_ORDER_STATUS_IMPORT-i_excludeinactive = 'X'.
SELECT objnr stat inact
FROM jest
INTO TABLE t_bapistat
WHERE objnr = l_objnr AND
inact 'X'.
ELSE.
SELECT objnr stat inact
FROM jest
INTO TABLE t_bapistat
WHERE objnr = l_objnr.
ENDIF.
IF sy-subrc 0.
No object status found
CLEAR message.
message-msgty = 'E'.
message-msgid = 'Z3'.
message-msgno = '001'.
message-msgv1 = BAPI_ORDER_STATUS_IMPORT-orderid.
PERFORM set_return_message USING message
CHANGING return.
IF 1 = 2.
MESSAGE e001(z3).
ENDIF.
ENDIF.
CHECK return IS INITIAL.
Read order status texts
SELECT istat txt04 txt30
FROM tj02t
INTO TABLE t_tj02t
FOR ALL ENTRIES IN t_bapistat
WHERE istat = t_bapistat-stat AND
spras = BAPI_ORDER_STATUS_IMPORT-i_spras.
SORT t_tj02t BY istat.
LOOP AT t_bapistat INTO g_bapistat.
READ TABLE t_tj02t
WITH KEY istat = g_bapistat-stat BINARY SEARCH
INTO g_tj02t.
IF sy-subrc = 0.
MOVE:
g_tj02t-txt04 TO g_bapistat-txt04,
g_tj02t-txt30 TO g_bapistat-txt30.
MODIFY t_bapistat FROM g_bapistat TRANSPORTING txt04 txt30.
ENDIF.
ENDLOOP.
ENDFUNCTION.
OBJNR like JEST-OBJNR
STAT like JEST-STAT
INACT like JEST-INACT
TXT04 like TJ02T-TXT04
TXT30 likeTJ02T-TXT30
Important note:
You will have to define a structure for every parameter in the BAPI. You cannot use the same structures used in existing applications because BAPI structures are frozen when BAPIs are released and then there are restrictions on changing them.
STEP 3 - Create the API Method Using the BAPI WIZARD
The BAPI wizard is used toTo expose the remote function module as a BAPI. The wizard will generate some additional code, so the function module is a valid method of the BOR. This allows the BAPi to be called as a workflow method in addition to be called by an outside program.
Note: Each function module corresponds to a method in the BOR
Go to the Business Object Builder SWO1.
You can either create the new Object type as a subtype of an existing business object or create a new business object from scratch. In this example it would be obvious to create the Object type as a subtype of BUS2005 Production order. However, to illustrate how to create a new Object type from scratch, we will do this.
In the Object/Interface type field write the name of the new Business Object: ZORDERSTAT. Press enter and fill in the additional fields necessary to create the object type.
Supertype: Not relevant because we are creating our object from scratch
Program. This is the name of the program where the wizard generates code for the Object type, NOT the function module we created earlier. The program name must not be the name of an existing program.
Press enter and create the new business object. Note that when you create the business object a standard interface, an attribute ObjectType and the methods ExistenceCheck and Display are automatically generated. These cannot be changed !
The next step is to add the Z_BAPI_GET_ORDER_STATUS method to the business object. Select Utilities -> API methods -> Add method and write the name of the function module in the dialog box. Next the dialog ox show below will be shown. This is the start screen of the BAPI wizard. Proceed with wizard by pressing the button.
After you have finished the wizard, you will notice that the ZGetOrderStatus has been added to the business object:
You can double-click on the method to see its properties. To use the business object you must change the Object type status to Implemented. Use menu Edit->Change releases status->Object type->To implemented. No you can test the object (Press F8).
Note that the BAPI wizard has added a wrapper class for the function module so it can be sued as method in the business object. Choose menu Goto->Program to display the program:
Implementation of object type ZORDERSTAT *****
INCLUDE <OBJECT>.
BEGIN_DATA OBJECT. " Do not change.. DATA is generated
only private members may be inserted into structure private
DATA:
" begin of private,
" to declare private attributes remove comments and
" insert private attributes here ...
" end of private,
KEY LIKE SWOTOBJID-OBJKEY.
END_DATA OBJECT. " Do not change.. DATA is generated
BEGIN_METHOD ZGETORDERSTATUS CHANGING CONTAINER.
DATA:
BAPIORDERSTATUSIMPORT LIKE ZBAPI_ORDER_STATUS_IMPORT,
RETURN LIKE BAPIRETURN,
TBAPISTAT LIKE ZBAPISTAT OCCURS 0.
SWC_GET_ELEMENT CONTAINER 'BapiOrderStatusImport'
BAPIORDERSTATUSIMPORT.
SWC_GET_TABLE CONTAINER 'TBapistat' TBAPISTAT.
CALL FUNCTION 'Z_BAPI_GET_ORDER_STATUS'
EXPORTING
BAPI_ORDER_STATUS_IMPORT = BAPIORDERSTATUSIMPORT
IMPORTING
RETURN = RETURN
TABLES
T_BAPISTAT = TBAPISTAT
EXCEPTIONS
OTHERS = 01.
CASE SY-SUBRC.
WHEN 0. " OK
WHEN OTHERS. " to be implemented
ENDCASE.
SWC_SET_ELEMENT CONTAINER 'Return' RETURN.
SWC_SET_TABLE CONTAINER 'TBapistat' TBAPISTAT.
END_METHOD.
STEP 4 - Final stepsWhen the Business object has been checked and the documentation created, the following steps must be carried out:
Release the BAPI function module (in the Function Builder).
Release the business object type (in the BOR ObjectType -> Change release status to -> Implemented ).
Release the BAPI as a method in the BOR (Release the methods you has created - Set the cursor on the method then
Edit -> Change release status -> Object type component -> To released )
For potential write BAPIs: Release the IDoc and its segments
You can now display the BAPI in the BAPI Explorer:
for detailed expalnation
http://www.erpgenie.com/abap/bapi/example.htm
do reward if helpful -
Bapi for return delivery of rejected goods
Hi experts,
can you tell me is there is any bapi for return delivery of rejected goods at transaction QA11?
thanksHi,
You need to use FM BAPI_PO_CREATE to create the return delivery.you have to manually the rejected goods.....
CALL FUNCTION 'BAPI_PO_CREATE'
EXPORTING
po_header = pohead
po_header_add_data = po_header_add_data
header_add_data_relevant = header_add_data_relevant
skip_items_with_error = 'X'
IMPORTING
purchaseorder = purchaseorder
TABLES
po_items = po_items
po_item_schedules = sched
return = return
po_business_partner = businesspartner.
Reward points if helpful,
regards,
jinesh. -
Hi Gurus,
Can you please tell me if there is any BAPI for transaction MI10(post document,count and difference: initial screen).
Is there any standard IDOC type for inventory management or any message type associated with inventory management IDoc.
ThanksHi,
check with below BAPIs
BAPI_MATPHYSINV_CHANGECOUNT Change count for particular items of a phys. inv. doc.
BAPI_MATPHYSINV_COUNT Enter count for particular items of a phys. inv. doc.
BAPI_MATPHYSINV_CREATE Create physical inventory document
BAPI_MATPHYSINV_CREATE_MULT Create physical inventory document
BAPI_MATPHYSINV_GETDETAIL Read items for a physical inventory document
BAPI_MATPHYSINV_GETITEMS Read list of physical inventory documents with items
BAPI_MATPHYSINV_GETLIST Read list of phys. inv. documents
BAPI_MATPHYSINV_POSTDIFF Post differences for certain items in a phys. inv. document
Thanks,
Asit Purbey. -
Does anybody know if there is a BAPI for transaction F-44 ?
hi,
look here
Re: BAPI for transaction F-03
A. -
BAPI for Transaction ME51N?
How to devlop Purchase Requisition BAPI for Transaction ME51N?
Hi vamshi,
We have BAPI
BAPI_REQUISITION_CREATE
BAPI_PR_CREATE
BAPI_REQUISITION_CHANGE
BAPI_PR_CHANGE
Please check this link
FOR CREATING:
http://www.erpgenie.com/abap/bapi/example.htm
http://www.****************/Tutorials/BAPI/CustomBAPICreation2/page1.htm
Best regards,
raam -
Does anybody know if there is a BAPI for transaction F-03 ?
hi,
use report rfbobl00 for trx FB05
Re: BAPI for F-30
A.
Message was edited by: Andreas Mann -
IDOC/ BAPI for transaction FB60
Hi Experts,
Can anybody tell me IDOC/ BAPI for transaction FB60 for document type (KR = Original Invoice).
ThanksHi Venkata,
Please refer below code, this works similar to FB60.
REPORT z_bapi_test.
*REPORT acc_bapi_test_document .
SELECTION-SCREEN BEGIN OF BLOCK bl01 .
PARAMETERS:
check_l RADIOBUTTON GROUP rb1,
check_a DEFAULT 'X' RADIOBUTTON GROUP rb1,
post RADIOBUTTON GROUP rb1.
SELECTION-SCREEN ULINE.
PARAMETERS:
rev_c RADIOBUTTON GROUP rb1,
rev_p RADIOBUTTON GROUP rb1.
SELECTION-SCREEN ULINE.
PARAMETERS:
ref_key LIKE bapiache01-obj_key DEFAULT 'TEST000001BAPICALL',
dest LIKE bdi_logsys-logsys DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK bl01 .
DATA:
gd_documentheader LIKE bapiache09,
gd_customercpd LIKE bapiacpa09,
gd_fica_hd LIKE bapiaccahd,
it_accountreceivable LIKE TABLE OF bapiacar09 WITH HEADER LINE,
it_accountgl LIKE TABLE OF bapiacgl09 WITH HEADER LINE,
it_accounttax LIKE TABLE OF bapiactx09 WITH HEADER LINE,
it_criteria LIKE TABLE OF bapiackec9 WITH HEADER LINE,
it_valuefield LIKE TABLE OF bapiackev9 WITH HEADER LINE,
it_currencyamount LIKE TABLE OF bapiaccr09 WITH HEADER LINE,
it_return LIKE TABLE OF bapiret2 WITH HEADER LINE,
it_receivers LIKE TABLE OF bdi_logsys WITH HEADER LINE,
it_fica_it LIKE TABLE OF bapiaccait WITH HEADER LINE,
it_accountpayable LIKE TABLE OF bapiacap09 WITH HEADER LINE,
it_paymentcard LIKE TABLE OF bapiacpc09 WITH HEADER LINE,
it_ext LIKE TABLE OF bapiacextc WITH HEADER LINE.
it_re LIKE TABLE OF bapiacre09 WITH HEADER LINE,
it_ext2 LIKE TABLE OF bapiparex WITH HEADER LINE.
PERFORM fill_internal_tables.
IF check_l = 'X'.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
DESTINATION dest
EXPORTING
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
TABLES
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
WRITE: / 'Result of check lines:'. "#EC NOTEXT
PERFORM show_messages.
ENDIF.
IF check_a = 'X'.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
DESTINATION dest
EXPORTING
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
TABLES
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
WRITE: / 'Result of check all:'. "#EC NOTEXT
PERFORM show_messages.
ENDIF.
IF post = 'X'.
DATA: l_type LIKE gd_documentheader-obj_type,
l_key LIKE gd_documentheader-obj_key,
l_sys LIKE gd_documentheader-obj_sys.
IF dest = space OR
dest = gd_documentheader-obj_sys.
post synchron
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
IMPORTING
obj_type = l_type
obj_key = l_key
obj_sys = l_sys
TABLES
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
WRITE: / 'Result of post:'. "#EC NOTEXT
PERFORM show_messages.
ELSE.
create Idoc
it_receivers-logsys = dest.
APPEND it_receivers.
CALL FUNCTION 'ALE_ACC_DOCUMENT_POST'
EXPORTING
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
TABLES
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
paymentcard = it_paymentcard
contractitem = it_fica_it
extension2 = it_ext2
realestate = it_re
receivers = it_receivers
COMMUNICATION_DOCUMENTS* APPLICATION_OBJECTS EXCEPTIONS
error_creating_idocs = 1
OTHERS = 2 .
IF sy-subrc = 0.
WRITE: / 'IDoc created'. "#EC NOTEXT
ELSE.
WRITE: sy-msgid.
ENDIF.
ENDIF.
ENDIF.
IF rev_p = 'X' OR rev_c = 'X'.
DATA: rev LIKE bapiacrev,
rev_key LIKE ref_key.
rev_key = ref_key.
rev_key(1) = 'R'.
rev-obj_type = gd_documentheader-obj_type.
rev-obj_key = rev_key.
rev-obj_sys = gd_documentheader-obj_sys.
rev-obj_key_r = ref_key.
IF rev_c IS INITIAL.
IF dest = space OR
dest = gd_documentheader-obj_sys.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_REV_POST'
EXPORTING
reversal = rev
bus_act = gd_documentheader-bus_act
TABLES
return = it_return.
ELSE.
it_receivers-logsys = dest.
APPEND it_receivers.
CALL FUNCTION 'ALE_ACC_DOCUMENT_REV_POST'
EXPORTING
reversal = rev
busact = gd_documentheader-bus_act
OBJ_TYPE = 'BUS6035'
SERIAL_ID = '0'
TABLES
receivers = it_receivers
COMMUNICATION_DOCUMENTS* APPLICATION_OBJECTS EXCEPTIONS
error_creating_idocs = 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.
ELSE.
WRITE: / 'IDoc created'. "#EC NOTEXT
ENDIF.
ENDIF.
ELSE.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_REV_CHECK'
EXPORTING
reversal = rev
bus_act = gd_documentheader-bus_act
TABLES
return = it_return.
ENDIF.
WRITE: / 'Result of Reversal Posting:'. "#EC NOTEXT
PERFORM show_messages.
ENDIF.
COMMIT WORK.
Kindly close if it helps you.
Regards
Abhii... -
FM or BAPI for transaction F871
Hello!
There are any Function Module or BAPI for transaction F871?
Thanks a lot!Hi,
Upon looking at FMFI package I only found the FM for change which is FI_PSO_FMPSO_CHANGE.. you can check the rest of the FM's below
FI_PSO_FMPSO_AGENTS
FI_PSO_FMPSO_CHANGE
FI_PSO_FMPSO_DISPLAY
FI_PSO_FMPSO_DOC_CHECK
FI_PSO_FMPSO_EVENT_00002213
FI_PSO_FMPSO_EVENT_00002214
FI_PSO_FMPSO_EVENT_00002216_E
FI_PSO_FMPSO_EVENT_00002218
FI_PSO_FMPSO_FIPP_DOC_DELETED
FI_PSO_FMPSO_FIPP_EVENT
FI_PSO_FMPSO_FIPP_PSOWF_UPDATE
FI_PSO_FMPSO_GROUP_DETERMINE
FI_PSO_FMPSO_HEADER_CHG_CHECK
FI_PSO_FMPSO_LIST_DISPLAY
FI_PSO_FMPSO_LOT_DELETE_CHECK
FI_PSO_FMPSO_POST_ALL
FI_PSO_FMPSO_RELEASE
FI_PSO_FMPSO_ROLE_DETERMINE
FI_PSO_FMPSO_WF_CHECK
FI_PSO_FMPSO_WF_DETERMINE
FI_PSO_FMPSO_WF_DISPLAY
FI_PSO_FMPSO_WF_EVENT
FI_PSO_FMPSO_WF_EVENT_CREATE
FI_PSO_FMPSO_WF_EVENT_REFRESH
FI_PSO_FMPSO_WF_EVENT_REFRESH
FI_PSO_FMPSO_WF_MAIN
Regards,
Leonard Chomi -
Any BAPI for Transaction VF01??
Hi Experts ,
Is there any Bapi for transaction VF01.
If it is then plz. do help me to use that one with coding .
Regards,
RahulHi,
Check this sample code of creating the billing document using the bapi BAPI_BILLINGDOC_CREATEMULTIPLE.
DATA: t_success TYPE STANDARD TABLE OF bapivbrksuccess WITH HEADER LINE.
DATA: t_billing TYPE STANDARD TABLE OF bapivbrk WITH HEADER LINE.
DATA: t_return TYPE STANDARD TABLE OF bapireturn1 WITH HEADER LINE.
t_billing-salesorg = vbak-vkorg.
t_billing-DISTR_CHAN = vbak-vtweg.
t_billing-DIVISION = vbak-spart.
t_billing-DOC_TYPE = vbak-auart.
t_billing-ref_doc = vbak-vbeln.
t_billing-ref_item = vbap-posnr.
t_billing-doc_number = vbak-vbeln.
t_billing-ITM_NUMBER = vbap-posnr.
t_billing-ordbilltyp = 'BILLING TYPE'.
t_billing-price_date = sy-datum.
t_billing-ref_doc_ca = vbak-vbtyp.
t_billing-sold_to = vbak-kunnr.
t_billing-material = vbap-matnr.
t_billing-plant = vbap-werks.
APPEND t_billing.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
TABLES
billingdatain = t_billing
return = t_return
success = t_success.
commit work.
<b>Reward points</b>
Regards
Maybe you are looking for
-
Can I Stop my Images from being Copied from my Web Pages
On some websites I visit, it prevents you from right clicking on the image and saving it. A message pops up saying the image cannot be copied. Would any of you kind folk know of a way I can stop my images from being saved from my Dreamweaver web page
-
How do I request refund or credit with itunes?
-
NullpointerException in SoapUI.jar
Hi . I'm facing below null pointer exception sometimes. 2012-04-12 09:01:09,187 INFO [STDOUT] Configuring log4j from [jar:file:/usr/cdhs/adobe_livecycle_es3/tmp/adobejb_server1/ArchiveStore/5029/soapui-2.0. 2.jar!/soapui-log4j.xml] 2012-04-12 09:01:
-
I just noticed this while browsing To receive your OS X Mountain Lion upgrade, you must complete the order form and provide an electronic copy of a dated, itemized sales receipt indicating the marketing part number(s) of the qualifying product(s) pur
-
Adobe Flash Player (AFP) not working on some websites. Help please?
I am trying to view some websites, but the area turns gray where the interactivity is (where Flash Player is needed). I uninstalled everything related to AFP, then went to the sites so they could direct me to install. I installed (I hope) the most re