‎2007 Jan 23 1:44 PM
HALLOW I doing a program that call to function that I build, in the function I import a table that the user have to put otype plvar and objid . I wont to do to this function in alv report with selection screen but I have a problem because for the table <b>z_course_table</b> when I choose course in the slection screen when I check in the debugger in this field Is empty it faild to read the course num.
what I doing wrong thankes
This is my function
CALL FUNCTION 'YHR_GET_EMP_COURSE_SINGLE'
EXPORTING
begda = so_date-low
endda = so_date-high
uname = uname
z_course_table = z_course_table
switch_history = switch_history
TABLES
itab_final = itab_final
it_final = it_final.
And in the function module import
Z_COURSE_TABLE LIKE HROBJECT
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
<b>SELECT-OPTIONS c_course FOR z_course_table NO INTERVALS.</b>
PARAMETERS uname TYPE sy-uname DEFAULT sy-uname.
PARAMETERS switch AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b2.
Thankes for your time
‎2007 Jan 23 1:48 PM
it should be
LECT-OPTIONS c_course FOR z_course_table-<b>course</b> NO INTERVALS.
where course is the coure field in ur ztable
‎2007 Jan 23 1:48 PM
it should be
LECT-OPTIONS c_course FOR z_course_table-<b>course</b> NO INTERVALS.
where course is the coure field in ur ztable
‎2007 Jan 23 1:55 PM
hi Chandrasekhar
in this table i have otype plvar and objid and i try with z_course_table-objid
and its not work maybe u have suggstion.
if u need more info to help let me now regards
‎2007 Jan 23 2:00 PM
if there is any searchhelp for that field only the values will come
or
use DYNP_VALUES_UPDATE FM as suggested by Alavaro
‎2007 Jan 23 2:05 PM
‎2007 Jan 23 2:09 PM
OH..i guess u want the value to be displayed in debug mode
while debugging check for value C_COURSE-LOW or C_COURSE-HIGH
i guess you are checking only c_course
‎2007 Jan 23 1:51 PM
You should use <b>DYNP_VALUES_READ</b> to get the values of your MatchCode field.
Greetings,
Blag.
‎2007 Jan 23 2:03 PM
hi Alvaro
u can give me exampele how to use it?
how i call it this is function?
regards
‎2007 Jan 23 1:58 PM
Hi,
Your select-option should be
SELECT-OPTIONS c_course FOR <b>z_course_table-COURSE_NO</b> NO INTERVALS.
IN the INITILIZATION event, fill the values from the table z_course_table to the select-option field
Regards
Sudheer
‎2007 Jan 23 2:04 PM
Hi Antonio,
Have 3 SELECT-OPTIONS, each for OTYPE, PLVAR and OBJID.
Before Exporting these values, Append them to internal table and pass this table to function module.
SELECT-OPTIONS c_OTYPE FOR z_course_table-OTYPE NO INTERVALS.
SELECT-OPTIONS c_PLVAR FOR z_course_table-PLVAR NO INTERVALS.
SELECT-OPTIONS c_OBJID FOR z_course_table-OBJID NO INTERVALS.
START-OF-SELECTION.
Z_COURSE_TABLE-OTYPE = C_OTYPE.
Z_COURSE_TABLE-PLVAR = C_PLVAR.
Z_COURSE_TABLE-OBJID = C_OBJID.
APPEND Z_COURSE_TABLE.
Thanks,
Vinay
‎2007 Jan 23 2:07 PM
dyname = sy-repid.
xdynpfields-fieldname = 'COURSE'.
APPEND xdynpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = dyname
dynumb = '1000'
translate_to_upper = 'X'
TABLES
dynpfields = xdynpfields
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.