‎2008 Feb 07 2:16 PM
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?
‎2008 Feb 07 2:19 PM
Do the recording in SHDB and check. You have to give the main screen no. SUBSCREEN do not work in BDC recording.
‎2008 Feb 07 2:19 PM
Do the recording in SHDB and check. You have to give the main screen no. SUBSCREEN do not work in BDC recording.
‎2008 Feb 07 2:24 PM
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.
‎2008 Feb 07 2:41 PM
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.
‎2008 Feb 07 2:43 PM
go to notepad-->
give 1st feild then press tab
like this u can create flat file
nd please dnt give any point for this
‎2008 Feb 07 2:48 PM
‎2008 Feb 07 2:50 PM
used tab but still not working...
For retail it shows in recording as R. so ive given R.
but still not working...
‎2008 Feb 07 2:50 PM
‎2008 Feb 07 2:52 PM
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.
‎2008 Feb 07 2:53 PM
i ve checkd in the debugging mode.. values are not there in the internal table...
‎2008 Feb 07 2:54 PM
‎2008 Feb 07 2:57 PM
&----
*& 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
‎2008 Feb 07 2:58 PM
‎2008 Feb 07 3:00 PM
‎2008 Feb 07 3:04 PM
yes.. changed the filetype to dat.
still same effect. no difference. did u run the program in the debug mode?
‎2008 Feb 07 3:14 PM
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?