‎2009 Jan 15 9:44 AM
Hi Experts,
I am reading the screen using FM DYNP_VALUES_READ or RS_SELECTIONSCREEN_READ.
I am passing DYNAME = sy-repid. But I am getting exception "INVALID_DYNPRONAME".
Can anyone please tell what is the issue here???
Best Regards
Manas
‎2009 Jan 15 9:48 AM
Hi Manas,
According to documentation of the function module it is better not to use SY-REPID. Try hard coding it .
Regards
‎2009 Jan 15 9:50 AM
HI,
In the start of your program copy the sy-repid into g_repid and then use this variable where it is required.
data: g_repid types sy-repid.
g_repid = sy-repid.
regards,
Venkatesh
‎2009 Jan 15 9:51 AM
hi,
because their domains will be diff. i mean check the data type , length or value table..
put name of program directly there and then check.
ex. DYNAME = 'zfdsghghsfsaf'
it will work for sure.
‎2009 Jan 15 9:55 AM
‎2009 Jan 15 10:41 AM
Hi All,
I tried with all the given options. But same error persists...
Best Regards
Manas
‎2009 Jan 15 10:46 AM
Hi Manas,
Can you please the code for your selection screen and the fm call , it can help us find the real Ãssue .
Regards
Arun
‎2009 Jan 15 10:50 AM
Hi Arun,
Here is the code...
DATA: it_DYNPREAD TYPE STANDARD TABLE OF DYNPREAD.
DATA: gd_prg TYPE D020S-PROG.
gd_prg = sy-repid.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = gd_prg
DYNUMB = '1000'
TRANSLATE_TO_UPPER = ' '
REQUEST = ' '
PERFORM_CONVERSION_EXITS = ' '
PERFORM_INPUT_CONVERSION = ' '
DETERMINE_LOOP_INDEX = ' '
TABLES
DYNPFIELDS = it_DYNPREAD
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11
.
The selection screen is PNP.
BR/Manas
‎2009 Jan 15 11:38 AM
Hi Manas ,
Please check the following
1. The FM is called in the AT SELECTION - SCREEN or its varaint events .
2. In the table it_DYNPREAD , populate the field fieldname with the name of the selection screen object in UPPER CASE .
Please check the following and test the progam , if you still have problem please revert back .#
Regards
Arun
‎2009 Jan 15 11:38 AM
Append the field that you want to read into the table it_DYNPREAD before calling the funtion module to read screen.
REFRESH : it_DYNPREAD.
CLEAR wa_dynp.
wa_dynp-fieldname = 'S_WORKQ-LOW'.
APPEND wa_dynp TO it_DYNPREAD.where is the selection screen field that you want to read.
regards,
Jinson
‎2009 Jan 15 11:44 AM
Hi
i have used the same code it is working fine.just check this
here p_table is in selection screen.
data : lt_tabfile type filetable,
l_subrc type sy-subrc,
lt_fields type table of dynpread with header line,
lv_value type char30.
lt_fields-fieldname = 'P_TABLE'.
append lt_fields.
clear lt_fields.
call function 'DYNP_VALUES_READ'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = lt_fields
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
others = 11.
read table lt_fields with key fieldname = 'P_TABLE'.
move lt_fields-fieldvalue to lv_value.
‎2009 Jan 15 11:50 AM
Hi,
try this...
data: gd_prg like d020s-prog value 'TESTPROG'here TESTPROG is program name and make sure it should be in capitals only.
‎2009 Jan 15 12:45 PM
I tried the same thing it's working fine.
check out this code..
hope it will help U.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = IT_DYNP
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11.
IF SY-SUBRC = 0.
READ TABLE IT_DYNP WITH KEY FIELDNAME = 'P_CUST'.
IF SY-SUBRC = 0.
V_CUST = IT_DYNP-FIELDVALUE.
ENDIF.
ENDIF.
Regards
Sekhar.C
‎2009 Feb 06 1:47 PM
‎2010 Dec 09 8:21 AM
I have the same problem with the FM 'DYNP_VALUES_READ'. I use the FM into a BADI.
this is my code :
dyname = sy-cprog.
wa_dynpfields-fieldname = 'MATNR'.
APPEND wa_dynpfields TO dynpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = dyname
dynumb = '0110'
translate_to_upper = 'X'
TABLES
dynpfields = dynpfields
EXCEPTIONS
invalid_abapworkarea = 01
invalid_dynprofield = 02
invalid_dynproname = 03
invalid_dynpronummer = 04
invalid_request = 05
no_fielddescription = 06
undefind_error = 07.
Can you tell me how i can solve the problem ?
Thanks.