10-08-2008 5:44 AM
hi ,
i have a prog in se38 i have to basically chage the mode of the prog n run it in 'A'
screen mode ..this prog basically uses the transactin mb01 to Read the data from xl file and creates the receipt through CALL TRANSACTION MB01 ....can any one plz tell me where should i do the changes n how should i go about to change the mode n display the output....
thanks ....
10-08-2008 5:57 AM
hi Anjum,
if u want to cahnge the mode to 'A' its simple.
change in the statement call transaction..... to mode 'A'.
u dont need to change anything more....
10-08-2008 5:58 AM
use Parameter in selection screen
in that declare mode as parameter
like
parameters: P_mode like CTU_PARAMS-DISMODE.
if u use this u vill get modes in selection screen than select N as ur input
10-08-2008 6:07 AM
hi,
PARAMETERS: P_MODE LIKE CTU_PARAMS-DISMODE.
CALL TRANSACTION 'VA01' USING TB_BDCDATA MODE P_MODE MESSAGES INTO TB_MESSAGE.
like this you can enter the mode in runtime.
10-08-2008 6:16 AM
hi in my prog there are many function one uploads using mb01 the xl sheet n generate the rec id n downloads it again in this prog where can i find call transaction in se38 only ..plz let me know or any other else ..
10-08-2008 6:29 AM
10-08-2008 6:52 AM
hi prakash im new to bdc not much experience im basically analyzing the flow of the prog .....just like to know the flow of foll command how should i debug the foll statements n wat is the effect
plz do help me thanks ..
the foll statement have been used n im stuck to proceed further
CALL TRANSACTION 'MB01'
USING bdcdata
MODE display_mode
UPDATE 'S'
MESSAGES INTO msgtbl.
10-08-2008 7:17 AM
try this
CALL TRANSACTION 'MB01'
USING bdcdata
MODE 'A'
UPDATE 'S'
MESSAGES INTO msgtbl.
10-08-2008 7:17 AM
Dear Saba,
call transaction 'PA30' USING BDCDATA MODE 'A' UPDATE 'A' messages INTO BDCMSGCOLL.
Before encountering this statement there all lot of performs statement the program flows through like the one below:
perform bdc_dynpro using 'SAPMP50A' '1000'.
perform bdc_field using 'P0014-BEGDA'
wa-BEGDA_005.
BDCDATA Structure consists of 5 fields:
PROGRAM, DYNPRO, DYNBEGIN, FNAM, FVAL.
So the structure will contain the Program name,
Screen Number,
Screen Begin marked 'X',
Field name,
Field Value.
by the time the program execution comes to the "call transaction" statement the BDC Structure will have all these values.
Using which we call the particular transaction & pass the data according to the BDCDATA.
after call transaction when your on debugger the control goes to the Std. program of the calling transaction
Regards
VIjay.
10-08-2008 7:20 AM
Hi,
In your program search for 'display_mode' and change display_mode = 'A'
Regards,
Surinder
10-08-2008 6:34 AM
The statement your lookin for is this
CALL TRANSACTION 'MB01' USING BDCDATA MODE 'A' UPDATE 'A' messages INTO BDCMSGCOLL.
I am also attaching a Sample format whichmight be more helpful for you.
report ZINFOTYPE14
no standard page heading line-size 255.
DATA: BDCDATA TYPE STANDARD TABLE OF BDCDATA WITH HEADER LINE.
DATA: BDCMSGCOLL TYPE STANDARD TABLE OF BDCMSGCOLL WITH HEADER LINE.
DATA: BEGIN OF EXCEL OCCURS 0.
INCLUDE STRUCTURE ALSMEX_TABLINE.
DATA: END OF EXCEL.
PARAMETER: FILE TYPE RLGRAP-FILENAME.
at selection-screen on value-request for FILE.
types: begin of TY_DATA,
data element: PERNR_D
PERNR_001(038),
data element: TIMRE
TIMR6_002(001),
data element: CHOIC
CHOIC_003(035),
data element: SUBTY
SUBTY_004(004),
data element: BEGDA
BEGDA_005(010),
data element: ENDDA
ENDDA_006(010),
data element: LGART
LGART_007(004),
data element: PAD_AMT7S
BETRG_008(018),
data element: WAERS
WAERS_009(005),
end of TY_DATA.
End generated data section ***
DATA: RECORD1 TYPE STANDARD TABLE OF TY_DATA,
RECORD TYPE TY_DATA.
End generated data section ***
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = FILE
.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = FILE
I_BEGIN_COL = 1
I_BEGIN_ROW = 4
I_END_COL = 6
I_END_ROW = 9999
TABLES
INTERN = EXCEL
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
.
loop at excel.
case excel-col.
when '001'.
RECORD-PERNR_001 = EXCEL-VALUE. """"""Personnel Number
when '002'.
RECORD-CHOIC_003 = EXCEL-VALUE.
when '003'.
RECORD-SUBTY_004 = EXCEL-VALUE.
WHEN '004'.
RECORD-BEGDA_005 = EXCEL-VALUE.
when '005'.
RECORD-ENDDA_006 = EXCEL-VALUE.
when '006'.
RECORD-BETRG_008 = EXCEL-VALUE.
endcase.
at end of row.
append RECORD to RECORD1.
clear RECORD.
endat.
endloop.
LOOP AT RECORD1 INTO RECORD.
CLEAR BDCDATA.
REFRESH BDCDATA.
perform bdc_dynpro using 'SAPMP50A' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=INS'.
perform bdc_field using 'RP50G-PERNR'
record-PERNR_001.
*perform bdc_field using 'RP50G-TIMR6'
record-TIMR6_002.
perform bdc_field using 'BDC_CURSOR'
'RP50G-SUBTY'.
perform bdc_field using 'RP50G-CHOIC'
record-CHOIC_003.
perform bdc_field using 'RP50G-SUBTY'
record-SUBTY_004.
perform bdc_dynpro using 'MP001400' '2000'.
perform bdc_field using 'BDC_CURSOR'
'Q0014-BETRG'.
perform bdc_field using 'BDC_OKCODE'
'=UPD'.
perform bdc_field using 'P0014-BEGDA'
record-BEGDA_005.
perform bdc_field using 'P0014-ENDDA'
record-ENDDA_006.
*perform bdc_field using 'P0014-LGART'
record-LGART_007.
perform bdc_field using 'Q0014-BETRG'
record-BETRG_008.
*perform bdc_field using 'P0014-WAERS'
record-WAERS_009.
call transaction 'PA30' USING BDCDATA MODE 'A' UPDATE 'A' messages INTO BDCMSGCOLL.
ENDLOOP.
----
Start new screen *
----
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
----
Insert field *
----
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> NODATA.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM.
Regards,
VIjay
Edited by: Vijay on Oct 8, 2008 7:35 AM