2012 Sep 28 4:54 PM
In my program, how can I have my currency drop down window only show 'US' and 'CAD'? I have not learned smart forms yet.
I have queried on this unsuccessfully thus far. I finally came up with an idea but have not been able to figure out how to do it.
My thought is to have my parameter call a temp table that pulls a select statement e.g.
SELECT * from tcurc
INTO CORRESPONDING FIELDS OF TABLE ztcurc
WHERE waers in ('CAD, 'USD').
Then my parameter is something like:
PARAMETERS: p_curr LIKE ztcurc-waers DEFAULT 'USD' OBLIGATORY.
Now when the user clicks the drop down only USD and CAD are options.
The problem I run into is that I haven't been able to get this result set into my parameter in time and my result shows all tcurc-waers.
After doing some debugging, I think that I need my temp table ztcurc in existence sometime before PAI finishes but not sure.
I am new to programming(1 year) and newer to ABAP.(3 months). I am running version 4.6C
I don't want to create a permanent table so I am thinking I may be able to add another file like in C++ a .cpp file can have a .h file
associated with it in the project.
This is my first question and I think I have followed procedure correctly. Be gentle .
2012 Oct 12 3:46 PM
Hi Doug,
You can set the values for your dropdown list using the function module 'VRM_SET_VALUES'.
For that you have to declare the type-pool 'VRM'.
Try the code given below.
TYPE-POOLS : vrm.
DATA: param TYPE vrm_id,
values TYPE vrm_values,
value LIKE LINE OF values.
PARAMETERS: p_curr(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
param = 'p_curr'.
value-key = '1'.
value-text = 'USD'.
APPEND value TO values.
value-key = '2'.
value-text = 'CAD'.
APPEND value TO values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = param
values = values.
Dont be afraid of being a beginner. Everyone started like that only. Even i'm one .
Regards,
Akhil
In my program, how can I have my currency drop down window only show 'US' and 'CAD'? I have not learned smart forms yet.
I have queried on this unsuccessfully thus far. I finally came up with an idea but have not been able to figure out how to do it.
My thought is to have my parameter call a temp table that pulls a select statement e.g.
SELECT * from tcurc
INTO CORRESPONDING FIELDS OF TABLE ztcurc
WHERE waers in ('CAD, 'USD').
Then my parameter is something like:
PARAMETERS: p_curr LIKE ztcurc-waers DEFAULT 'USD' OBLIGATORY.
Now when the user clicks the drop down only USD and CAD are options.
The problem I run into is that I haven't been able to get this result set into my parameter in time and my result shows all tcurc-waers.
After doing some debugging, I think that I need my temp table ztcurc in existence sometime before PAI finishes but not sure.
I am new to programming(1 year) and newer to ABAP.(3 months). I am running version 4.6C
I don't want to create a permanent table so I am thinking I may be able to add another file like in C++ a .cpp file can have a .h file
associated with it in the project.
This is my first question and I think I have followed procedure correctly. Be gentle .
2012 Oct 12 3:46 PM
Hi Doug,
You can set the values for your dropdown list using the function module 'VRM_SET_VALUES'.
For that you have to declare the type-pool 'VRM'.
Try the code given below.
TYPE-POOLS : vrm.
DATA: param TYPE vrm_id,
values TYPE vrm_values,
value LIKE LINE OF values.
PARAMETERS: p_curr(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
param = 'p_curr'.
value-key = '1'.
value-text = 'USD'.
APPEND value TO values.
value-key = '2'.
value-text = 'CAD'.
APPEND value TO values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = param
values = values.
Dont be afraid of being a beginner. Everyone started like that only. Even i'm one .
Regards,
Akhil
2012 Oct 12 3:53 PM
Hi Doug,
If you are doing this in module pool,
then instead of the event 'AT SELECTION-SCREEN OUTPUT', you can put the code after that under the event 'PROCESS_BEFORE_OUTPUT'.
Hope it helps.
Regards,
Akhil
2012 Oct 15 9:19 PM
Hi Akhil,
Thank you very much for your help with this. I was able to get this to work.
Best regards,
Doug
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |