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

problem in BDC for MM02

Former Member
0 Likes
680

Hi,

I am working on a BDC for the tcode MM02 in which i have to insert the Inspection Type in the Quality Managment View of materials. i had executed the code which was working fine,but when i executed it ,it remains on the same screen where the after specifying on the file path. I dont know why it is happening ,plzz provide me guidelines for solving this problem.

Hi,

I am working on a BDC for the tcode MM02 in which i have to insert the Inspection Type in the Quality Managment View of materials. i had executed the code which was working fine,but when i executed it ,it remains on the same screen where the after specifying on the file path. I dont know why it is happening ,plzz provide me guidelines for solving this problem.

3 REPLIES 3
Read only

Former Member
0 Likes
598

report ZMM02 no standard page heading line-size 255.

include bdcrecx1.

DATA: BEGIN OF ZVBM OCCURS 0,

MATNR(18) TYPE C,

BRGEW(16) TYPE C,

NTGEW(16) TYPE C,

END OF ZVBM.

start-of-selection.

CALL FUNCTION 'WS_UPLOAD'

EXPORTING

  • CODEPAGE = ' '

FILENAME = 'c:\vijay.txt'

FILETYPE = 'DAT'

  • HEADLEN = ' '

  • LINE_EXIT = ' '

  • TRUNCLEN = ' '

  • USER_FORM = ' '

  • USER_PROG = ' '

  • DAT_D_FORMAT = ' '

  • IMPORTING

  • FILELENGTH =

TABLES

DATA_TAB = ZVBM

  • EXCEPTIONS

  • CONVERSION_ERROR = 1

  • FILE_OPEN_ERROR = 2

  • FILE_READ_ERROR = 3

  • INVALID_TYPE = 4

  • NO_BATCH = 5

  • UNKNOWN_ERROR = 6

  • INVALID_TABLE_WIDTH = 7

  • GUI_REFUSE_FILETRANSFER = 8

  • CUSTOMER_ERROR = 9

  • OTHERS = 10

.

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 open_group.

LOOP AT ZVBM.

perform bdc_dynpro using 'SAPLMGMM' '0060'.

perform bdc_field using 'BDC_CURSOR'

'RMMG1-MATNR'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'RMMG1-MATNR'

zvbm-matnr.

perform bdc_dynpro using 'SAPLMGMM' '0070'.

perform bdc_field using 'BDC_CURSOR'

'MSICHTAUSW-DYTXT(01)'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

perform bdc_field using 'MSICHTAUSW-KZSEL(01)'

'X'.

perform bdc_dynpro using 'SAPLMGMM' '4004'.

perform bdc_field using 'BDC_OKCODE'

'=BU'.

perform bdc_field using 'MAKT-MAKTX'

'VIJAY3'.

perform bdc_field using 'MARA-MEINS'

'KG'.

perform bdc_field using 'MARA-MATKL'

'01'.

perform bdc_field using 'MARA-SPART'

'01'.

perform bdc_field using 'BDC_CURSOR'

'MARA-NTGEW'.

perform bdc_field using 'MARA-BRGEW'

zvbm-brgew.

perform bdc_field using 'MARA-GEWEI'

'KG'.

perform bdc_field using 'MARA-NTGEW'

zvbm-ntgew.

perform bdc_transaction using 'MM02'.

ENDLOOP.

perform close_group.

Read only

Former Member
0 Likes
598

Where are you giving your file path?

I guess you are choosing file to upload the required data from legacy system to internal table.

If I'm correct, your program may be calling transaction as follows,

CALL TRANSACTION 'MM01' USING bdctab MODE 'E' or 'N'.

So if the data is perfect the program will not show you any screen for mode 'E' and for mode 'N'

it will not show you any screen.

These are the modes you can use:

"A" :Processing with display of screens

"E" :Display of screens only if an error occurs

"N" :Processing without display of screens. If a breakpoint is reached in one of the called transactions, processing is terminated with sy-subrc same as 1001. The field sy-msgty contains "S", sy-msgid contains "00", sy-msgno contains "344", sy-msgv1 contains "SAPMSSY3", and sy-msgv2 contains "0131".

"P" :Processing without display of the screens. If a breakpoint is reached in one of the called transactions, the system branches to the ABAP Debugger.

Regards,

Manoj Kumar P

Edited by: Manoj Kumar on Dec 11, 2008 3:58 PM

Read only

former_member156446
Active Contributor
0 Likes
598

Hi probably the code has executed and the program might not be capable of showing the output...

Once the code or BDC is executed the its a good practice to read the tables with describe statements ans show the output like:

No. of records Read : ***                      No. of Error Records: ****

No. of Success Records: ***