Hi Everybody,
I have a very big problem drop-down menu.
First, let me explain the problem. I have two linked menu.
Choose from a menu line as well as other menu choices that will vary depending on the line.
But for the global table that is changing all the rows. I want to change a single line.
Example;
Here for the first-line choice we make.
Which are connected to the future of the group. But as I said, is a global table for all rows are changing.
For example, let's choose the third line.
Accordingly, the group is coming. There is no shortage here. But. Other lines are also changing.
I wanna do I choose the menus in line should be changed. Others do not change.
Any switch this line from the first dropdown group, across the dropdown content should be changed. All of them do not change.
Code let me explain.
WHEN 'GT_PENTP'.
READ TABLE gt_t062 INDEX gv_changed_row.
CLEAR gt_t062-saknr .
MODIFY gt_t062 INDEX gv_changed_row.
PERFORM set_vrm_for_gt_saknr.
"When I first made a selection from the dropdown group.
"my choice is reading the index of the row."it clears the line in the second dropdown.
"And a global table that is selected by the row updating.
"perform is entering.
*&---------------------------------------------------------------------*
*& Form SET_VRM_FOR_GT_SAKNR
*&---------------------------------------------------------------------*
FORM set_vrm_for_gt_saknr .
DATA : t065 TYPE zfi_t065 OCCURS 0 WITH HEADER LINE.
DATA : id TYPE vrm_id,
lt_vat TYPE vrm_values,
ls_val LIKE LINE OF lt_vat.
SELECT * FROM zfi_t065
INTO CORRESPONDING FIELDS OF TABLE t065
WHERE pentp EQ gt_t062-pentp. " 1. DROPDOWN selected index
IF sy-subrc EQ 0.
SELECT saknr txt50 FROM skat
INTO TABLE gt_itab FOR ALL ENTRIES IN t065
WHERE saknr EQ t065-saknr.
LOOP AT t065.
LOOP AT gt_itab .
IF gt_itab-saknr EQ t065-saknr.
MOVE : t065-saknr TO ls_val-key.
CONCATENATE t065-saknr '-' gt_itab-txt50
INTO ls_val-text SEPARATED BY space.
APPEND ls_val TO lt_vat.
ELSEIF
ls_val-key = ' '.
ls_val-text = ' '.
APPEND ls_val TO lt_vat.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDIF.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'GT_T062-SAKNR' " 2. DROPDOWN
values = lt_vat
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
ENDFORM. " SET_VRM_FOR_GT_SAKNR
When I use this code is changing all at once.
Can you help.
Best Regards Rasim.