2008 Apr 09 11:40 PM
Hi all,
there is a existing bdc program for goods receipt in our system.
I had added 2 lines of code to the existing recording part of the program.
the problem is at last screen the command =BU is not coming in the popup screen(which will show all the okcodes, even popup window is not coming)
when i comment my part of the code, the popup window is showing =BU command...
I dont understand whatz the problem is .....
i have tried to post goods receipt using bapi_goodsmvt_create, but its throwing error messages.
I have to post good with subcontract material.
I have PO number, Delivery No, Quantity.
Material etc....
Thanks in advance.
Hi all,
there is a existing bdc program for goods receipt in our system.
I had added 2 lines of code to the existing recording part of the program.
the problem is at last screen the command =BU is not coming in the popup screen(which will show all the okcodes, even popup window is not coming)
when i comment my part of the code, the popup window is showing =BU command...
I dont understand whatz the problem is .....
i have tried to post goods receipt using bapi_goodsmvt_create, but its throwing error messages.
I have to post good with subcontract material.
I have PO number, Delivery No, Quantity.
Material etc....
Thanks in advance.
2008 Apr 10 12:07 AM
Hello Rao,
You have to debug your BDC and have to find out as we don't have your system access.
Also for the BAPI you can populate the data to the BAPI as per the belwo code :
DATA: gmhead type BAPI2017_GM_HEAD_01.
DATA: gmcode type BAPI2017_GM_CODE.
DATA: itab type table of BAPI2017_GM_ITEM_CREATE with header line.
data: it_err type table of BAPIRET2 with header line.
DATA: it_test type ZTEST_WM.
gmhead-pstng_date = sy-datum.
gmhead-doc_date = sy-datum.
gmhead-header_txt = 'TEST'.
gmcode-gm_code = '03'. "03 - MB1A - Goods Issue
itab-material = '100-300'.
itab-plant = '1000'.
itab-stge_loc = '0088'.
itab-move_type = '201'.
itab-entry_qnt = '1'.
itab-gr_rcpt = w_goods_recipient.
itab-costcenter = '1000'.
itab-orderid = w_order_num.
itab-reserv_no = '66132'.
itab-res_item = '0001'.
itab-network = w_network.
append itab.
clear itab.
*break ppanand.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = gmhead
GOODSMVT_CODE = gmcode
IMPORTING
MATERIALDOCUMENT = mat_doc
MATDOCUMENTYEAR = doc_yr
TABLES
GOODSMVT_ITEM = itab
RETURN = it_err.
*break-point.
read table it_err with key type = 'E'.
if sy-subrc <> 0.
it_test-mat_doc = mat_doc.
it_test-doc_yr = doc_yr.
it_test-sdate = sy-datum.
it_test-stime = sy-uzeit.
insert ZTEST_WM from it_test.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
.
break-point.
*
COMMIT WORK.
do 30 times.
wait up to 3 seconds.
break-point.
enddo.
break-point.
else.
break-point.
endif.
Hope this helps.
Thanks,
Greetson
2008 Apr 10 12:13 AM
Hey thanks for the reply...
i have to post the goods receipt using.
gm-code 01,
move type = 101,
move ind = 'b'.
i have to process the subcontraced material using the function module.
when i pass this data to the fm its saying Material Document data and PO data does not match (material)
but when run through recording for the same materials and po its working fine, but the problem is with the last screen.
can u help me for the scenario.
thanks
2008 Apr 10 4:25 AM
Can you tell the exact two lines that u added:
Because when you want that pop up screen to be displayed.Do u know its screen number and the ok code for it.
If u pass the prog name and screen no. , cursor and okcode , it will work.
Thanks
Harshu
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |