2010 Mar 15 4:53 AM
Hi experts,
I have 2 reports. In the first report i have the 3 input fields in the first report, how do i pass the values to the next report which is transaction: ZKKBC_PKO_2.
I want to display in the next report the selections that the user previously selected.
First report:
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: COMP LIKE AFRU-WERKS OBLIGATORY MODIF ID s1.
PARAMETERS: PERIOD LIKE COEP-PERIO OBLIGATORY MODIF ID s1.
PARAMETERS: YEAR LIKE COEP-GJAHR OBLIGATORY MODIF ID s1.
SELECTION-SCREEN END OF BLOCK b1.
CALL TRANSACTION 'ZKKBC_PKO_2'.
Anyone can help me?
Thanks,
Lawrence
2010 Mar 15 6:53 AM
Hi experts,
I have 2 reports. In the first report i have the 3 input fields in the first report, how do i pass the values to the next report which is transaction: ZKKBC_PKO_2.
I want to display in the next report the selections that the user previously selected.
First report:
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: COMP LIKE AFRU-WERKS OBLIGATORY MODIF ID s1.
PARAMETERS: PERIOD LIKE COEP-PERIO OBLIGATORY MODIF ID s1.
PARAMETERS: YEAR LIKE COEP-GJAHR OBLIGATORY MODIF ID s1.
SELECTION-SCREEN END OF BLOCK b1.
CALL TRANSACTION 'ZKKBC_PKO_2'.
Anyone can help me?
Thanks,
Lawrence
2010 Mar 15 5:01 AM
HI,
1. Find out the PID ( Parameter IDs ) of the variables .
2. Pass the values into these parameter ids before you call the transaction.
3. call transaction in the normal way
The second way is that you can write a small BDC only for the first screen of the transaction and pass the values
Hope this helps,
Raj
2010 Mar 15 5:04 AM
Hi
Use SET PARAMETER ID in your first program.
" Just go to the Screen painter of the Selection Screen and in the attribute of these fields add below PARAMETER IDs
for COEP-PERIO use VPE as PARAMETER ID
for COEP-GJAHR use GJR as PARAMETER ID
for WERKS use WRK as PARAMETER IDCheerz
Ram
2010 Mar 15 5:06 AM
Hi,
If the transaction fields ZKKBC_PKO_2 has parameter id.You can find parameter id in Data element of the field.
You can pass the values like.
SET PARAMETER ID 'KUN' FIELD COMP.
here the value of COMP will be passed to parameter id field 'KUN'.Then call the transaction.
CALL TRANSACTION 'ZKKBC_PKO_2'.
If you dont hvae fileds with parameter id the use BDC via Call transaction method.
regards,
Shanmugavel Chandrasekaran
2010 Mar 15 5:25 AM
Hi Shanmugavel,
It works for me now. but now i wanna put the value in the selection screen. So when the user reaches the next screen the values can be displayed.
Can this be done?
Thanks,
Lawrence
2010 Mar 15 5:29 AM
Did you get any chance to read [this document|http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/dba51a35c111d1829f0000e829fbfe/content.htm]?
2010 Mar 15 6:03 AM
Hi experts,
What i did is this:
Using SET PARAMETER
in the first report
SET PARAMETER ID 'WRK' FIELD COMP.
SET PARAMETER ID 'VPE' FIELD PERIOD.
SET PARAMETER ID 'GJR' FIELD YEAR.
CALL TRANSACTION 'ZKKBC_PKO_2'.
Second Report
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
PARAMETERS: WRK LIKE AFRU-WERKS.
PARAMETERS: VPE LIKE COEP-PERIO.
PARAMETERS: GJR LIKE COEP-GJAHR.
SELECTION-SCREEN END OF BLOCK blk1.
Using SUBMIT
First Report
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: COMP LIKE AFRU-WERKS OBLIGATORY MODIF ID s1.
PARAMETERS: PERIOD LIKE COEP-PERIO OBLIGATORY MODIF ID s1.
PARAMETERS: YEAR LIKE COEP-GJAHR OBLIGATORY MODIF ID s1.
SELECTION-SCREEN END OF BLOCK b1.
SUBMIT ZCO_PRDCOST_ACTUAL_2 VIA SELECTION-SCREEN USING SELECTION-SETS OF PROGRAM 'ZCO_PRDCOST_ACTUAL_1' AND RETURN.
Second Report:
GET PARAMETER ID 'WRK' FIELD comp.
GET PARAMETER ID 'VPE' FIELD COEP-PERIO.
GET PARAMETER ID 'GJR' FIELD YEAR.
Either this 2 ways i still cannot get the first report selection values on the 2nd report. Can someone help me see if my codes is correcT?
2010 Mar 15 5:08 AM
Hi,
Please try to use SUBMIT program instead of CALL TRANSACTION.
Hope this helps,
Regards,
Chandravadan
2010 Mar 15 5:12 AM
2010 Mar 15 5:22 AM
hi,
set the parameter id.
pass the value in the call transaction statement...
2010 Mar 15 6:53 AM
2010 Mar 15 7:10 AM
<li>You can use Memory id with Parameters statement, it works.
<li>Calling program
<li>In Called program
SET PARAMETER ID 'WRK' FIELD comp.
SET PARAMETER ID 'VPE' FIELD period.
SET PARAMETER ID 'GJR' FIELD year.
CALL TRANSACTION 'ZKKBC_PKO_2'.
Thanks
Venkat.OSELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
PARAMETERS: wrk LIKE afru-werks MEMORY ID wrk.
PARAMETERS: vpe LIKE coep-perio MEMORY ID vpe.
PARAMETERS: gjr LIKE coep-gjahr MEMORY ID gjr.
SELECTION-SCREEN END OF BLOCK blk1.
2010 Mar 15 7:15 AM
Hi Venkat,
it works!! thanks.
last qn: how do i disable the 3 fields. I do not want the user to edit the information.
2010 Mar 15 8:35 AM
2010 Mar 15 8:42 AM
Hi,
at selection-screen output.
loop at screen.
if screen-name = 'P_WERKS'. "
SCREEN-INPUT = 0.
elseif screen-name = 'SECOND_PARAMETER'
SCREEN-INPUT = 0.
MODIFY SCREEN.
ELSEIF
SCREEN-INPUT = 0.
MODIFY SCREEN.
elseif screen-name = 'THIRD_PARAMETER'
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.Cheerz
Ram
2010 Mar 15 8:45 AM
>
> Anyone can help?
The reason no one's helping you is "Disabling Selection-Screen fields" is a FAQ. And answering it would be a forum rule violation
2010 Mar 15 8:58 AM
Hi,
Actually your codes can work. The fields are disabled but all the values are gone in the second screen.
2010 Mar 15 9:27 AM
Hi ,
did you try the following:
SUBMIT ZCO_PRDCOST_ACTUAL_2
VIA SELECTION-SCREEN
AND RETURN
WITH WRK = COMP
WITH VPE = PERIOD
WITH GJR = GJAHR.
2010 Mar 16 12:10 AM
Yes. I did try the following. Now the values get passed to the next report. And i manage to disable the fields. But the problem is when i disabled my fields all the values in it get lost as well...
Guys any ideas for this?
2010 Mar 15 10:02 AM
I'll leave this open due to everybody's efforts so far, but please search for existing anwers before posting the next question!
Thanks
Thomas