Application Development 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: 

Populated fields in the ALV report

Former Member
0 Kudos

Hi All,

I created one report using ALV grid Methods.

The Report looks like.

MATNR MAKTX PLANT

123 bolts 1000

124 nuts 1000

Then what my problem is : these fields are editable in screen.

when i enter the MATNR number and press the ENTER from keyboard the MAKTX populated automatically in the screen.

Please help me how can i do it.

Thanks

4 REPLIES 4

Former Member
0 Kudos

Hi Vandana,

Try this code at ur User Command.

&----


*& Form get_screen_data

&----


FORM get_screen_data.

DATA: lt_display LIKE TABLE OF gt_display.

REFRESH lt_display.

CLEAR lt_display.

lt_display[] = gt_display[].

CLEAR ref_grid.

IF ref_grid IS INITIAL.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

IMPORTING

e_grid = ref_grid.

ENDIF.

IF NOT ref_grid IS INITIAL.

CALL METHOD ref_grid->check_changed_data.

ENDIF.

IF lt_display[] NE gt_display[].

gv_tosave = 'X'.

ENDIF.

ENDFORM.

Above form i have written for my object to check if there are any changes in ALV. Final if will check if original data and ALV data are same or not.

Here u can write ur code as if both are different then again get the data from Database table and display in ALV.

rwrd points if useful

Bhupal

0 Kudos

Hi Bhupal,

I did my code in PBI but

when i press the Enter in satus bar it's populating the data in alv screen.

but , I want to press the keyboard enter button?

Regards,

Vandana.

former_member226203
Active Contributor
0 Kudos

Hi,

If the requirement is like if u enter MATNR then MAKTX should be populated automatically for the MATNR entered, then you can assign a function code to MATNR and inyour code you can check if okcode = function code then write a select query to fetch the value for the MATNR that is entered.

0 Kudos

hi ,

would u please tell me how to assign the function code to MATNR.

Thnaks.