10-23-2007 7:19 PM
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!
10-23-2007 9:47 PM
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!
10-23-2007 7:22 PM
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
a®
10-23-2007 7:23 PM
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
10-23-2007 7:24 PM
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
10-23-2007 7:25 PM
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.
10-23-2007 7:59 PM
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!
10-23-2007 8:12 PM
Hello,
Can you please provide me specific details like, transaction code and which field you want to update?
Regards,
Naimesh
10-23-2007 8:53 PM
http://www.erpgenie.com/abap/bdc.htm
http://www.sapdevelopment.co.uk/bdc/bdc_ctcode.htm
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
http://abap-gallery.blogspot.com/2007/08/bdc-batch-data-communication-tutorial.html
http://www.savefile.com/files/155321
http://www.savefile.com/files/155324
http://www.savefile.com/files/155326
Regards,
Abhishek
10-23-2007 9:47 PM
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!
10-23-2007 9:56 PM
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
10-23-2007 9:58 PM
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
10-23-2007 11:53 PM
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.
10-24-2007 2:10 PM
Hello All,
Thanks to everyone...I got BDC working.... 🐵 thanks to all who guided me on this...