Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding dynamic report

Former Member
0 Likes
741

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

4 REPLIES 4
Read only

Former Member
0 Likes
723

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

Read only

0 Likes
723

hi satya...thanks for ur reply..

i dont want the value of SY-LISEL,I want the value of CCC, how to get ...

Read only

p291102
Active Contributor
0 Likes
723

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_request

Thanks,

Sankar M

Read only

Former Member
0 Likes
723

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.