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 doubt

Former Member
0 Likes
1,463

In BDC, do we have to consider the main screen number or the sub-screen number. Coz, when i press F1 and technical information on the field in MM01 then it shows 2 screen numbers as 1002,4004.

which one do i have to consider?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,437

Do the recording in SHDB and check. You have to give the main screen no. SUBSCREEN do not work in BDC recording.

15 REPLIES 15
Read only

Former Member
0 Likes
1,438

Do the recording in SHDB and check. You have to give the main screen no. SUBSCREEN do not work in BDC recording.

Read only

Former Member
0 Likes
1,437

Hi SRK, (Does is means Shahrukh , Joking,

If you are doing a BDC then the screen on which you want to do BDC should be in a order.

You can check the order very easily by doing a sample BDC on that particular trasaction thru SHDB or SM35 transaction.

If you donot want a particular screen or a subcreen, provided it does not have any mandatory value, you can remove it from your BDC.

You can search about BDC in the forum. There are lot of threads.

Hope it helps.

Jayant Sahu.

Read only

0 Likes
1,437

thanks for the reply.

can u provide me the flat file with a space between the fields:

order is:

industry sector

material type

material description

unit of measure

material group.

I've given the following flat file:

retail drinks coke kg 00107

but its not working. In debugging mode i checked the internal table . it contains only 'R' - may be for retail. but the rest of the items are empty.

Read only

0 Likes
1,437

go to notepad-->

give 1st feild then press tab

like this u can create flat file

nd please dnt give any point for this

Read only

0 Likes
1,437

then what about the 'has field seperator' value?

Read only

0 Likes
1,437

used tab but still not working...

For retail it shows in recording as R. so ive given R.

but still not working...

Read only

0 Likes
1,437

Put it as X

Read only

0 Likes
1,437

ive given it as X .. but when i execute ,, it says:

FIELD RMMG1-MTART. INPUT VALUE IS LONGER THAN SCREEN FIELD in the status bar.

Read only

0 Likes
1,437

i ve checkd in the debugging mode.. values are not there in the internal table...

Read only

0 Likes
1,437

Paste ur code

Read only

0 Likes
1,437

&----


*& Report ZM_BDCP_MM01_SRK *

*& *

&----


*& *

*& *

&----


REPORT ZM_BDCP_MM01_SRK .

**STRUCTURE FOR FLAT FILE

TYPES: BEGIN OF XT_MAT,

MBRSH TYPE MARA-MBRSH, "INDUSTRIAL SECTOR

MTART TYPE MARA-MTART, "MATERIAL TYPE

MAKTX TYPE MAKT-MAKTX, "MATERIAL DESCRIPTION

MEINS TYPE MARA-MEINS, "BASIC UNIT OF MEASURE

MATKL TYPE MARA-MATKL, "MATERIAL GROUP

END OF XT_MAT.

DATA: IT_MAT TYPE STANDARD TABLE OF XT_MAT,

WA_MAT TYPE XT_MAT.

DATA: FILENAME TYPE STRING.

DATA: IT_BDCDATA TYPE STANDARD TABLE OF BDCDATA,

WA_BDCDATA TYPE BDCDATA,

IT_BDCMSG TYPE STANDARD TABLE OF BDCMSGCOLL, "TO CAPTURE ERROR MESSAGES

WA_BDCMSG TYPE BDCMSGCOLL.

SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETER: R1 RADIOBUTTON GROUP GRP,

R2 RADIOBUTTON GROUP GRP,

P_FILE LIKE IBIPPARMS-PATH. "TO SELECT THE FILE

SELECTION-SCREEN: END OF BLOCK B1.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

PERFORM GETFILE.

PERFORM GETDATA.

&----


*& Form GETFILE

&----


FORM GETFILE .

CALL FUNCTION 'F4_FILENAME'

EXPORTING

PROGRAM_NAME = SYST-CPROG

  • DYNPRO_NUMBER = SYST-DYNNR

  • FIELD_NAME = ' '

IMPORTING

FILE_NAME = P_FILE. "SELECT THE FILE FROM P_FILEBROWSE PARAMETER

FILENAME = P_FILE.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = FILENAME "IT CONTAINS FILENAME FROM P_FILEBROWSE PARAMETER

FILETYPE = 'ASC'

HAS_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = IT_MAT.

ENDFORM. " GETFILE

&----


*& Form GETDATA

&----


FORM GETDATA .

LOOP AT IT_MAT INTO WA_MAT.

***FOR INITIAL SCREEN MM01.(FIRST SCREEN)

PERFORM BDC_DYNPRO USING 'SAPLMGMM' '0060'.

PERFORM BDC_FIELD USING 'RMMG1-MBRSH' 'WA_MAT-MBRSH'. "INDUSTRIAL SECTOR

PERFORM BDC_FIELD USING 'RMMG1-MTART' 'WA_MAT-MTART'. "MATERIAL TYPE

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=AUSW'.

***FOR SELECTING VIEWS. (SECOND SCREEN)

PERFORM BDC_DYNPRO USING 'SAPLMGMM' '0070'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' 'MSICHTAUSW-DYTXT(01)'.

PERFORM BDC_FIELD USING 'MSICHTAUSW-KZSEL(01)' 'X'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=ENTR'.

      • FOR ENTERING BASIC DATA1.

PERFORM BDC_DYNPRO USING 'SAPLMGMM' '4004'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=BU'.

PERFORM BDC_FIELD USING 'MAKT-MAKTX' 'WA_MAT-MAKTX'. "MATERIAL DESCRIPTION

PERFORM BDC_FIELD USING 'MARA-MEINS' 'WA_MAT-MEINS'. "BASIC UNIT OF MEASURE

PERFORM BDC_FIELD USING 'MARA-MATKL' 'WA_MAT-MATKL'. "MATERIAL GROUP

***USING CALL TRANSACTION.

CALL TRANSACTION 'MM01'

USING IT_BDCDATA

MODE 'A'

UPDATE 'A'

MESSAGES INTO IT_BDCMSG.

ENDLOOP.

ENDFORM. " GETDATA

----


  • Start new screen *

----


FORM BDC_DYNPRO USING PROGRAM DYNPRO.

CLEAR WA_BDCDATA.

WA_BDCDATA-PROGRAM = PROGRAM.

WA_BDCDATA-DYNPRO = DYNPRO.

WA_BDCDATA-DYNBEGIN = 'X'.

APPEND WA_BDCDATA TO IT_BDCDATA.

ENDFORM. "BDC_DYNPRO

----


  • Insert field *

----


FORM BDC_FIELD USING FNAM FVAL.

IF FVAL IS NOT INITIAL.

CLEAR WA_BDCDATA.

WA_BDCDATA-FNAM = FNAM.

WA_BDCDATA-FVAL = FVAL.

APPEND WA_BDCDATA TO IT_BDCDATA.

ENDIF.

ENDFORM. "BDC_FIELD

Read only

0 Likes
1,437

Flat file is:

R drinks coke KG 00107

Read only

0 Likes
1,437

hmmmmmmmmm

welll give the file type as DAT

Read only

0 Likes
1,437

yes.. changed the filetype to dat.

still same effect. no difference. did u run the program in the debug mode?

Read only

0 Likes
1,437

What is your problem right now?

Is that IT_MAT table is not being populated or do you have a problem with the field MTART in the BDC?