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 for MI31

Former Member
0 Likes
605

Hi Experts,

i need bdc for mk01 transaction.Can anyone help me as it's very urgent.

Thanks,

Krishan

Hi Experts,

i need bdc for mk01 transaction.Can anyone help me as it's very urgent.

Thanks,

Krishan

3 REPLIES 3
Read only

Former Member
0 Likes
557

Hi Krishan Kumar,

The main thing is that I remember having a similar issues with a

"jurisdiction code pop-up for XK01 (I think that was it..) and i remember

making use of the RFC call - CALL FUNCTION 'RFC_DETERMINE_JURISDICTION'...

good luck.

  • begin insert - dtr080701

DATA: itab_record_count TYPE i VALUE 0,

rfc_dest_t(32) TYPE c.

DATA: BEGIN OF itab_loc_results OCCURS 0.

INCLUDE STRUCTURE com_jur.

DATA: END OF itab_loc_results.

DATA: BEGIN OF jur_info.

INCLUDE STRUCTURE com_jur.

DATA: END OF jur_info.

DATA: BEGIN OF ft_add OCCURS 0.

INCLUDE STRUCTURE bdcdata.

DATA: END OF ft_add.

DATA: line_v TYPE i,

jur_count TYPE i VALUE 0.

CLEAR: ft_add.

ft_add-program = 'SAPLFYTX_B_JUR'.

ft_add-dynpro = '0910'.

ft_add-dynbegin = 'X'.

APPEND ft_add.

CLEAR: ft_add.

ft_add-fnam = 'BDC_CURSOR'.

ft_add-fval = 'COUNTER(1)'.

APPEND ft_add.

CLEAR: ft_add.

ft_add-fnam = 'BDC_OKCODE'.

ft_add-fval = '=PICK'.

APPEND ft_add.

CLEAR: ft_add.

rfc_dest_t = 'AVP'.

  • end insert - dtr080701

  • depending on state/zip code, a popup to choose from multiple

  • jurisdiction codes may appear when BDC runs (XK01). Therefore, need

  • to identify vendors that will have multiple jurisdiction codes and add

  • additional dynapro codes to handle the popup. In these circumstances,

  • will modify table FT to pick the 1st line of popup

  • ie. SAPLFYTX_B_JUD 0910

jur_info-country = blfa1-land1.

jur_info-state = blfa1-regio.

jur_info-city = blfa1-ort01.

jur_info-zipcode = blfa1-pstlz.

CALL FUNCTION 'RFC_DETERMINE_JURISDICTION'

EXPORTING

destination = rfc_dest_t

location_data = jur_info

  • IMPORTING

  • LOCATION_ERR TABLES

location_results = itab_loc_results.

  • begin add/mod - dtr010302

DESCRIBE TABLE itab_loc_results LINES itab_record_count.

IF itab_record_count > 1. "* multiple jurisdiction codes found

  • end add/mod - dtr010302

LOOP AT ft.

IF ft-fval = '=$MTE'.

line_v = sy-tabix + 1.

INSERT LINES OF ft_add

INTO ft INDEX line_v.

ENDIF.

ENDLOOP.

ENDIF

i hope it will be usefull. if not reply me ur requirements.

thanks

karthik

reward me if usefull

Read only

0 Likes
557

Hi karthik,

Sorry by mistake i put mk01 in place of MI31. I want to create aa bdc for MI31. Please help me.

Regards,

Krishan

Read only

0 Likes
557

Hi Krishna,

Use t-code MI31 instead of using MI01 , it will give you a document number of all your stock.

You can use MI31 transaction code to generate a batch input which is a faster method for uploading the data for large number of articles. One point to remeber is Std. SAP does not support PI for more than 999 articles in 1 document. So if you have more than 999 articles multiple documents will get created. In MI31 you can mention the number of documents to be created and also the number of articles per document can be specified.

thanks

karthik