Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

bdc /bapi urgent

Former Member
0 Likes
491

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.

3 REPLIES 3
Read only

Former Member
0 Likes
470

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

Read only

0 Likes
470

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

Read only

Former Member
0 Likes
470

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