2013 Sep 26 10:47 AM
Sir,
The requirement is to call the standard transaction cv03n by the data given in the parameters.
I have used parameter id's and passed the values to the first screen and used the statement.
CALL TRANSACTION 'CV03N' AND SKIP FIRST SCREEN.
In output screen of cv03n t-code there are three tabs.
1) Document data 2) Description 3) Originals.
by default the output is showing on document data screen,
now the user wants to display the output screen in originals tab.
any suggestions how to deal with this requirement.
Regards,
satish.P
2013 Sep 26 11:01 AM
Hi Satish,
you can replace option AND SKIP FIRST SCREEN with option USING bdc_tab where bdc_tab is an internal table of type bdcdata.
You can make a recording (tcode SHDB) filling 1st screen and switching to tab Originals in 2nd screen of tcode cv03n and use it to fill your bdc_tab.
Regards,
Klaus
Sir,
The requirement is to call the standard transaction cv03n by the data given in the parameters.
I have used parameter id's and passed the values to the first screen and used the statement.
CALL TRANSACTION 'CV03N' AND SKIP FIRST SCREEN.
In output screen of cv03n t-code there are three tabs.
1) Document data 2) Description 3) Originals.
by default the output is showing on document data screen,
now the user wants to display the output screen in originals tab.
any suggestions how to deal with this requirement.
Regards,
satish.P
2013 Sep 26 10:56 AM
Hi Satish,
Can i know the requirement in detail .
Thanks
S.Rajendranath raparthi.
2013 Sep 26 11:30 AM
Sir,
proc 1.1 In cv03n t-code first screen will be there, there after giving the values it will processed to the second screen.
through a zprogram i have passed the values of cv03n first screen through spa/gpa.
and used call transaction 'cv03n' and skip first screen.
Proc 1.2 :- by the above statement the control have gone to second screen of cv03n
there three tab's are there
by default it is showing on first tab in detail screen,
but the user wants the position of the cursor on 3rd tab.
2013 Sep 26 11:01 AM
Hi Satish,
you can replace option AND SKIP FIRST SCREEN with option USING bdc_tab where bdc_tab is an internal table of type bdcdata.
You can make a recording (tcode SHDB) filling 1st screen and switching to tab Originals in 2nd screen of tcode cv03n and use it to fill your bdc_tab.
Regards,
Klaus
2013 Sep 26 11:23 AM
sir,
Thanks for the reply,
i have processed earlier by the way u have defined.
i am getting some runtime errors, i will paste the code after some time
pls see the code and pls explain where i am going wrong
2013 Sep 26 1:04 PM
Sir,
Please see the code which i have written and the problem i am facing with the bdc
approach is if i have taken mode as 'A' , the foreground process is running from the
first screen, if i have taken the mode as 'N', the output is not displaying at all.
Please go through the code and help me to solve the problem sir
DATA : P_DOCNO TYPE DOKNR,
P_DOCTYP TYPE DOKAR,
P_DOCPT TYPE DOKTL_D,
P_DOCVER TYPE DOKVR.
DATA : IT_BDCDATA TYPE TABLE OF BDCDATA,
WA_BDCDATA TYPE BDCDATA.
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : S_DOCNO TYPE DOKNR MATCHCODE OBJECT ZDCONP_SRHELP default 'EXY1234'," DOCUMENT NO
S_DOCTYP TYPE DOKAR MATCHCODE OBJECT ZDOCTYP_SRHELP default 'mm1', " DOCUMENT TYPE
S_DOCPT TYPE DOKTL_D MATCHCODE OBJECT ZDOCPRT_SRHLP default '000', " Document Part
S_DOCVER TYPE DOKVR MATCHCODE OBJECT ZDCOVER_SRHLP default '01' . " DOCUMENT VERSION
SELECTION-SCREEN : END OF BLOCK B1.
P_DOCNO = S_DOCNO.
P_DOCTYP = S_DOCTYP.
P_DOCPT = S_DOCPT.
P_DOCVER = S_DOCVER.
PERFORM F001_BDC_DYNPRO USING 'SAPLCV110' '0100'.
PERFORM F002_BDC_FIELD USING 'BDC_CURSOR' 'DRAW-DOKNR'.
PERFORM F002_BDC_FIELD USING 'BDC_OKCODE' '/00'.
PERFORM F002_BDC_FIELD USING 'DRAW-DOKNR' 'EXY1234'.
PERFORM F002_BDC_FIELD USING 'DRAW-DOKAR' 'MM1'.
PERFORM F002_BDC_FIELD USING 'DRAW-DOKTL' '000'.
PERFORM F002_BDC_FIELD USING 'DRAW-DOKVR' '01'.
PERFORM F001_BDC_DYNPRO USING 'SAPLCV110' '0101'.
PERFORM F002_BDC_FIELD USING 'BDC_OKCODE' '=TSFILES'.
CALL TRANSACTION 'CV03N' USING IT_BDCDATA
MODE 'A'
UPDATE 'S'.
FORM F001_BDC_DYNPRO USING PROGRAM TYPE ANY
DYNPRO TYPE ANY.
CLEAR WA_BDCDATA.
WA_BDCDATA-PROGRAM = PROGRAM.
WA_BDCDATA-DYNPRO = DYNPRO.
WA_BDCDATA-DYNBEGIN = 'X'.
APPEND WA_BDCDATA TO IT_BDCDATA.
ENDFORM. "F001_BDC_DYNPRO
*----------------------------------------------------------------------*
* Insert field *
*----------------------------------------------------------------------*
FORM F002_BDC_FIELD USING FNAM TYPE ANY
FVAL TYPE ANY.
CLEAR WA_BDCDATA.
WA_BDCDATA-FNAM = FNAM.
WA_BDCDATA-FVAL = FVAL.
APPEND WA_BDCDATA TO IT_BDCDATA.
ENDFORM. "F002_BDC_FIELD
2013 Sep 30 9:03 AM
Sir,
Please see the code which i have written and the problem i am facing with the bdc
approach is if i have taken mode as 'A' , the foreground process is running from the
first screen, if i have taken the mode as 'N', the output is not displaying at all.
Please go through the code and help me to solve the problem sir
DATA : P_DOCNO TYPE DOKNR,
P_DOCTYP TYPE DOKAR,
P_DOCPT TYPE DOKTL_D,
P_DOCVER TYPE DOKVR.
DATA : IT_BDCDATA TYPE TABLE OF BDCDATA,
WA_BDCDATA TYPE BDCDATA.
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : S_DOCNO TYPE DOKNR MATCHCODE OBJECT ZDCONP_SRHELP default 'EXY1234'," DOCUMENT NO
S_DOCTYP TYPE DOKAR MATCHCODE OBJECT ZDOCTYP_SRHELP default 'mm1', " DOCUMENT TYPE
S_DOCPT TYPE DOKTL_D MATCHCODE OBJECT ZDOCPRT_SRHLP default '000', " Document Part
S_DOCVER TYPE DOKVR MATCHCODE OBJECT ZDCOVER_SRHLP default '01' . " DOCUMENT VERSION
SELECTION-SCREEN : END OF BLOCK B1.
P_DOCNO = S_DOCNO.
P_DOCTYP = S_DOCTYP.
P_DOCPT = S_DOCPT.
P_DOCVER = S_DOCVER.
PERFORM F001_BDC_DYNPRO USING 'SAPLCV110' '0100'.
PERFORM F002_BDC_FIELD USING 'BDC_CURSOR' 'DRAW-DOKNR'.
PERFORM F002_BDC_FIELD USING 'BDC_OKCODE' '/00'.
PERFORM F002_BDC_FIELD USING 'DRAW-DOKNR' 'EXY1234'.
PERFORM F002_BDC_FIELD USING 'DRAW-DOKAR' 'MM1'.
PERFORM F002_BDC_FIELD USING 'DRAW-DOKTL' '000'.
PERFORM F002_BDC_FIELD USING 'DRAW-DOKVR' '01'.
PERFORM F001_BDC_DYNPRO USING 'SAPLCV110' '0101'.
PERFORM F002_BDC_FIELD USING 'BDC_OKCODE' '=TSFILES'.
CALL TRANSACTION 'CV03N' USING IT_BDCDATA
MODE 'A'
UPDATE 'S'.
FORM F001_BDC_DYNPRO USING PROGRAM TYPE ANY
DYNPRO TYPE ANY.
CLEAR WA_BDCDATA.
WA_BDCDATA-PROGRAM = PROGRAM.
WA_BDCDATA-DYNPRO = DYNPRO.
WA_BDCDATA-DYNBEGIN = 'X'.
APPEND WA_BDCDATA TO IT_BDCDATA.
ENDFORM. "F001_BDC_DYNPRO
*----------------------------------------------------------------------*
* Insert field *
*----------------------------------------------------------------------*
FORM F002_BDC_FIELD USING FNAM TYPE ANY
FVAL TYPE ANY.
CLEAR WA_BDCDATA.
WA_BDCDATA-FNAM = FNAM.
WA_BDCDATA-FVAL = FVAL.
APPEND WA_BDCDATA TO IT_BDCDATA.
ENDFORM. "F002_BDC_FIELD
2013 Sep 30 9:31 AM
2013 Sep 30 11:33 AM
Hi
Please do the recoding till the tab you want to go and then stop the recording.
I believe it is more of a fault with the contents of BDCDATA structure. Check in debugging they should match exactly the one you have while recording.
Nabheet
2013 Oct 01 12:59 PM
SIR,
The program has worked on Mode 'E'.
completed the requirement.
Thank u.
2013 Sep 26 11:27 AM
Hi,
You need to mention the fields and their values which controls subscreen in the BDCTAB.
The fields and values for "Originals" tab is :
pfx_dynp = '0103'.
pfx_repid = 'SAPLCV110' "report name.
lf_flag = 'X'.
regards,
Ashish Rawat
2013 Sep 30 10:21 AM
Hi Satish,
The tab Original has a screen no : 103
so, u can try the below code :
PERFORM F001_BDC_DYNPRO USING 'SAPLCV110' '0100'.
PERFORM F002_BDC_FIELD USING 'BDC_CURSOR' 'DRAW-DOKNR'.
PERFORM F002_BDC_FIELD USING 'BDC_OKCODE' '/00'.
PERFORM F002_BDC_FIELD USING 'DRAW-DOKNR' 'EXY1234'.
PERFORM F002_BDC_FIELD USING 'DRAW-DOKAR' 'MM1'.
PERFORM F002_BDC_FIELD USING 'DRAW-DOKTL' '000'.
PERFORM F002_BDC_FIELD USING 'DRAW-DOKVR' '01'.
PERFORM F001_BDC_DYNPRO USING 'SAPLCV110' '0103'.
PERFORM F002_BDC_FIELD USING 'BDC_OKCODE' '=TSFILES'. CALL TRANSACTION 'CV03N' USING IT_BDCDATA
MODE 'A'
UPDATE 'S'.