03-23-2010 11:24 AM
Hey there,
I want to predeclare a field of a transaction which i call up from my program.
This is my code:
SET PARAMETER ID 'RFKZ0-KEYZ1' FIELD dfkkzk_zeile-keyz1.
CALL TRANSACTION 'FP05'.
RFKZO-KEYZ1 is the field I want to predeclare. Dfkkzk_zeile-keyz1 shall fill it.
Why this doesnt work? Dfkkzk_zeile-keyz1 is not empty i checked it in debugger.
Thx a lot
03-23-2010 11:36 AM
in the structure RFKZ0 for the field KEYZ1( actually its a component) has dataelement KEYZ1_KK ( component type ). when you check the further characteristic of the data element , no parameter id is set for the dataelement. so you cannot use GET and SEt parameter for the filed KEYZ1. you cannot use SAP memory to initialize the field
03-23-2010 11:27 AM
03-23-2010 11:34 AM
Hi,
Cross check the parameter ID for KEYZ1, is it really RFKZO-KEYZ1, as i do not think parameter IDs name can be so long.
As i do not have access to a SAP system, i am not sure. Please cross check.
Regards,
Chen
03-23-2010 11:36 AM
in the structure RFKZ0 for the field KEYZ1( actually its a component) has dataelement KEYZ1_KK ( component type ). when you check the further characteristic of the data element , no parameter id is set for the dataelement. so you cannot use GET and SEt parameter for the filed KEYZ1. you cannot use SAP memory to initialize the field
03-23-2010 11:48 AM
try using the Additions ' AND SKIP FIRST SCREEN ' or ' USING bdc_tab [bdc_options] ' for CALL TRANSACTION statement.
since no parameter ID exists for the field KEYZ1, you have the go for the addition ' USING bdc_tab [bdc_options] ' for pre declaring the fields
Edited by: jeevitha krishnaraj on Mar 23, 2010 12:51 PM
03-23-2010 12:10 PM
HEy guys,
thanks a lot for your answers. The field RFKZ0-KEYZ1 shall be right because when i fill something in the field and execute the transaction in debugging mode the field RFKZ0-KEYZ1 is filled with the typed letters and there is no move.
I tried with skip first screen but there is no sense because the first screen in the transaction screen is the selection screen where i can fill the field RFKZ0-KEYZ1. [Here|http://i.imagehost.org/0855/232.jpg] is a screenshot.
I tried also with the using table addition but didnt get any reason. But perhaps i programed it wrong. Can u give me some example for the using table code?
Any other idea?
Thanks
03-23-2010 12:23 PM
There is no TABLE addition for the CALL TRANSACTION statement
Just try using F1 help for the CALL TRANSACTION staement , SAP has given sample codes.
03-23-2010 12:54 PM
Nice help...never discovered the f1 help before...I read the F1 help of call transaction about 100 times now and dont get along with my problem...Thanks for this glorious answer
I continue trying to find the answer by myself
03-23-2010 1:33 PM
Hi Markok,
DATA : var TYPE rfkz0-keyz1.
var = '10000'.
SET PARAMETER ID '8ZS' FIELD var. " Use 8ZS as parameter ID
CALL TRANSACTION 'FP05'.
If sy-subrc = 0.
" This is a tested code snippet
endif.
In Module MODULE STAPEL_STATUS. " This is the Code you will find and these are the PARAMETER IDs Used
IF RFKZ0-KEYZ1 EQ SPACE.
IF RFKZ0-XSCHS = 'X'.
GET PARAMETER ID '8CS' FIELD RFKZ0-KEYZ1.
ELSEIF RFKZ0-XCRDS = 'X'.
GET PARAMETER ID '8PS' FIELD RFKZ0-KEYZ1.
ELSEIF RFKZ0-XZAUS = 'X'.
GET PARAMETER ID '8OS' FIELD RFKZ0-KEYZ1.
ELSE.
GET PARAMETER ID '8ZS' FIELD RFKZ0-KEYZ1.
"Depending on your requirement you choose from above 8CS, 8PS, 8OS or 8ZS
ENDIF.
ENDIF.
" Take F1 Help and go to Technical Help and in this module(Available in Screen 100 in PBO) Put a break Point
Cheerz
Ram
03-24-2010 6:24 AM
Thanks a lot Ramchander. You really helped me.Your answer serves as an example.
10 Points.