‎2008 May 14 5:44 AM
hi,
I have a requirement like...
i want to display a report as material, qty for the given document for ex. sales document..then user have to enter amount for the corresponding material...i have to capture that dynamically entered value...then i have to proceed further,is there option to do...
regards
sugumar
‎2008 May 14 5:52 AM
Hi,
Try to use the below code or even you can do the same using ALV Reports with the required Events.
data ccc(10) type c.
start-of-selection.
write: 'bbb', ccc input on.
at line-selection.
write sy-lisel.
Regards,
Satya
Edited by: satyanarayana tanguturu on May 14, 2008 6:53 AM
‎2008 May 14 6:18 AM
hi satya...thanks for ur reply..
i dont want the value of SY-LISEL,I want the value of CCC, how to get ...
‎2008 May 14 5:56 AM
Hi,
Following report is the sample report for Dynamic Alv Report.
REPORT YMS_ALVDYNAMIC .
TYPE-POOLS : vrm. "Value Request Manager
PARAMETERS: p_test AS LISTBOX VISIBLE LENGTH 20 OBLIGATORY.
INITIALIZATION.
PERFORM f4_value_request.
START-OF-SELECTION.
WRITE P_TEST.
*&--------------------------------------------------------------------*
*& Form f4_value_request
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
FORM f4_value_request.
DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list.
l_value-key = '1'.
l_value-text = 'Value 1'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '2'.
l_value-text = 'Value 2'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '3'.
l_value-text = 'Value 3'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '4'.
l_value-text = 'Value 4'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'P_TEST'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_name
values = li_list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_value_requestThanks,
Sankar M
‎2008 May 14 6:00 AM
HI,
You need to give the field qty in edit mode
to do this you need build the field catalog for this field in edit = 'x'.
Now by doing this user can enter the value qty on the screen.
to capture back the value you need to use the below method
Just use the one in bold in the user command subroutine
Function module to display the ALV report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = W_REPID
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
P_SELFLD TYPE SLIS_SELFIELD.
DATA : L_REP_MODE. "report mode
CASE P_UCOMM.
Data ref1 type ref to cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = ref1.
call method ref1->check_changed_data
WHEN 'SAVE'.
loop at itab where check eq 'X'.
endloop.
ENDCASE.
ENDFORM.
Regards,
Siva chalasani.