Application Development 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: 

Copying fields from one screen to another

Former Member
0 Kudos

Hi All,

I want to move data from one field of a program to another field of a different program. I mean, I have a date field (this field i will fill with the current date or any other date value) in my program. This field is a parameter on my screen. Now in my program I am calling a transaction, which opens up a new program with new screen. I want to pass my date value to this new screen. Is it possible to do that? Pls explain with an example. Greatly appreciate that!

Thanks in advanced!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Naimesh,

Thanks very much for your help!

"Can you please provide me specific details like, transaction code and which field you want to update?"

Here are some more details:

In my program I have following parameters:

PARAMETERS:

p_ledger LIKE rkal1-rldnr DEFAULT 'Z1',

p_sdate LIKE t811c-sdate,

p_edate LIKE t811c-edate.

in my at selection-screen block...I set up a flag to see which transaction user wants to run.

IF flag = '1'.

CALL TRANSACTION 'GA31'.

after this transaction call... a new screen comes up which has ledger and starting date fields. These are the two fields I am trying populate from the first screen.

Thanks again for your help!

12 REPLIES 12

former_member194669
Active Contributor
0 Kudos

Hi,


          set parameter id 'YATT' field wa_dblclk-aedat.
          call transaction 'YATT3' and skip first screen.

Please check the calling program have the same parameter name

naimesh_patel
Active Contributor
0 Kudos

Hello J Are,

You can use the set parameter-id, if the parameter-id is avaliable for that field.

You can check this out with F1 and technical help on that field.

If you are using the SUBMIT to call another report, just pass the variable like

SUBMIT ZTEST_NP

WITH P_DATE = P_CURR_DATE.

If you are calling the transaction with call transaction, than make a small BDC which can populate your date field from the input from the first program.

Regards,

Naimesh Patel

ferry_lianto
Active Contributor
0 Kudos

Hi,

You can use SUBMIT statement with select selscreen_parameters option.


SUBMIT zreport with p_param1 = 'value'
               with p_param2 = 'value'
               and return.

Regards,

Ferry Lianto

Former Member
0 Kudos

Hi

You can do this by setting and getting to parameter ID.

Please press F1 on the following docuements, SAP provides clear documentation.

SET PARAMETER

GET PARAMETER

But if both of your programs are calling each other or so (means in the same session) you can EXPORT and IMPORT.

Regards

Surya.

Former Member
0 Kudos

Hello All,

"If you are calling the transaction with call transaction, than make a small BDC which can populate your date field from the input from the first program."

Can you please show me an example of BDC...since I am using call transaction in my program to start the other program.

Thanks in advanced!

0 Kudos

Hello,

Can you please provide me specific details like, transaction code and which field you want to update?

Regards,

Naimesh

Former Member
0 Kudos

Hello Naimesh,

Thanks very much for your help!

"Can you please provide me specific details like, transaction code and which field you want to update?"

Here are some more details:

In my program I have following parameters:

PARAMETERS:

p_ledger LIKE rkal1-rldnr DEFAULT 'Z1',

p_sdate LIKE t811c-sdate,

p_edate LIKE t811c-edate.

in my at selection-screen block...I set up a flag to see which transaction user wants to run.

IF flag = '1'.

CALL TRANSACTION 'GA31'.

after this transaction call... a new screen comes up which has ledger and starting date fields. These are the two fields I am trying populate from the first screen.

Thanks again for your help!

0 Kudos

Try:


SET parameter id 'GLN' field p_ledger.
set parameter id 'GAS' field p_sdate.
call transaction 'GA31' .

But note that you are not setting the "cycle" field.

Rob

Message was edited by:

Rob Burbank

0 Kudos

Hello J Are,

Acctually, the screen fields of transaction GA31 has the parameter-ids, which you can set in your program before calling the transaction.

Like:

REPORT ZTEST_NP.

PARAMETERS:

p_ledger LIKE rkal1-rldnr DEFAULT 'Z1',

P_CYCLE LIKE RKAL1-GLCYC, " << I have cycle mandatory in my system for GA31

p_sdate LIKE t811c-sdate,

p_edate LIKE t811c-edate.

IF FLAG = '1'.

SET PARAMETER ID : 'GLN' FIELD p_ledger,

'GCY' field p_cycle,

'GAS' field p_sdate.

CALL TRANSACTION 'GA31' AND SKIP FIRST SCREEN.

ENDIF.

Regards,

Naimesh Patel

Former Member
0 Kudos

Hi Naimesh,

Appreciate your time and sorry to bother you again and again. Can you please show me how to do this in BDC. This is the first time I will be using the BDC. If it is too much, you can let me know. Than I can use the parameter id's. I am very greatful for your help.

Thanks again.

Former Member
0 Kudos

Hello All,

Thanks to everyone...I got BDC working.... 🐵 thanks to all who guided me on this...