2007 May 14 2:16 PM
Hi,
In the PBO event i use an select query, the data present in the internal table will be concatenated into variable fetch into the screen(9000) of text element. how i code it?
2007 May 15 5:24 AM
Hi Chaitanya,
code it using this logic ....
after you get your data into the itab , call a FM VRM_SET_VALUES and pass the values there ...
This sample code will solve your problem ...
add these two in the top include or declaration part along with other declarations of itables ..
type-pools vrm.
data: name type vrm_id.
data: l_wa_mat_descr type vrm_value,
l_tab_mat_descr type vrm_values.
select matnr from mara
into table l_tab_mara_matnr
where matkl = 'ZPMBMAT'.
if not l_tab_mara_matnr[] is initial.
select maktx from makt
into l_tab_collect_maktx_frm_db-material_descr
for all entries in l_tab_mara_matnr
where matnr = l_tab_mara_matnr-material_no.
append l_tab_collect_maktx_frm_db.
endselect.
endif.
loop at l_tab_collect_maktx_frm_db into l_wa_collect_maktx_frm_db.
l_wa_mat_descr-key = l_wa_collect_maktx_frm_db-material_descr.
append l_wa_mat_descr to l_tab_mat_descr.
endloop.
name = 'ZCOT_PPT_DTLS-MATERIAL_DESCR'. " screen field name
call function 'VRM_SET_VALUES'
exporting
id = name
values = l_tab_mat_descr
exceptions
id_illegal_name = 1
others = 2.
Reward if helpful !
Regards,
Ranjita
Hi,
In the PBO event i use an select query, the data present in the internal table will be concatenated into variable fetch into the screen(9000) of text element. how i code it?
2007 May 14 2:19 PM
Write down code Like :
PBO.
Module mod.
module mod.
select * from vvv into vvvv..
concatenate fld1 fld2 into fld3.
leave to screen 9000.
endmodule .
reward points if it is useful
Thanks
Seshu
2007 May 14 2:21 PM
Hi,
You can write the Select Query in the PBO event,
So loop that internal table, then catch the internal table value, then cancatinate that value and use the MOVE statment to move that value to that text element, and make sure that the Text element shoulb be the Screen field, then only it will appear in the Screen
Regards
Sudheer
2007 May 14 2:38 PM
HI Sudheer Junnuth,
iF I HAVE 5 Text elements on the screen ..hw to process it??
2007 May 15 4:42 AM
Hi Chaitanya,
To make this thing work for 5 Text Elements.
Write a loop like this.
Loop at itab into wa.
if counter le 5.
concatenate text_element1 itab-f1 into text_element1.
endif.
if counter le 10 and counter > 5.
concatenate text_element2 itab-f1 into text_element2.
endif.
if counter le 15 and counter > 10.
concatenate text_element3 itab-f1 into text_element3.
endif.
counter = coutner + 1.
endloop.
Like this you can create for all text_elements.
Hope this will solve your query.
<b><i>** Pl. reward points and motivate us.</i></b>
2007 May 15 5:24 AM
Hi Chaitanya,
code it using this logic ....
after you get your data into the itab , call a FM VRM_SET_VALUES and pass the values there ...
This sample code will solve your problem ...
add these two in the top include or declaration part along with other declarations of itables ..
type-pools vrm.
data: name type vrm_id.
data: l_wa_mat_descr type vrm_value,
l_tab_mat_descr type vrm_values.
select matnr from mara
into table l_tab_mara_matnr
where matkl = 'ZPMBMAT'.
if not l_tab_mara_matnr[] is initial.
select maktx from makt
into l_tab_collect_maktx_frm_db-material_descr
for all entries in l_tab_mara_matnr
where matnr = l_tab_mara_matnr-material_no.
append l_tab_collect_maktx_frm_db.
endselect.
endif.
loop at l_tab_collect_maktx_frm_db into l_wa_collect_maktx_frm_db.
l_wa_mat_descr-key = l_wa_collect_maktx_frm_db-material_descr.
append l_wa_mat_descr to l_tab_mat_descr.
endloop.
name = 'ZCOT_PPT_DTLS-MATERIAL_DESCR'. " screen field name
call function 'VRM_SET_VALUES'
exporting
id = name
values = l_tab_mat_descr
exceptions
id_illegal_name = 1
others = 2.
Reward if helpful !
Regards,
Ranjita
2007 May 15 11:24 AM
Hi Chaitanya ,
If this question is answered then plese reward points and mark as answered ..
Regards,
Ranjita
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |