cancel
Showing results for 
Search instead for 
Did you mean: 

sap script - displaying fields

Former Member
0 Kudos

Hi all,

This is the select statement i am using :

select matnr wrkst meins from mara into corresponding fields of table imara WHERE wrkst = p_wrkst.

select * from j_1irg1 into corresponding fields of table t_rg1 for all ENTRIES IN imara where meins = imara-meins.

How to get data's from a structure? In the below code please tell me how to print the t_rg1(j_1irg1 table)data's.

i am getting values till t_rg1-meins, after that i am not getting from( j_2icomp-op_qty)

form get_data_and_write.

data: save_matnr like mara-matnr.

clear: j_1irg1, j_2icomp, save_matnr.

loop at t_rg1.

j_2icomp-stdate = p_stdate.

j_2icomp-endate = p_endate.

if save_matnr ne t_rg1-matnr.

  • fill header line with matnr, description, chapterid and unit

j_1irg1-chapid = t_rg1-chapid.

mara-matnr = t_rg1-matnr.

marav-maktx = t_rg1-maktx.

mara-meins = t_rg1-meins.

save_matnr = t_rg1-matnr.

*

if sy-tabix ne 1.

j_2icomp-new_page = true.

else.

j_2icomp-new_page = false.

endif.

else.

j_2icomp-new_page = false.

endif.

perform write_form using element-spac function-set

typ-body window-main .

  • determine line to display viz. manufacture entry/removal entry

if t_rg1-matform = c_packed.

j_2icomp-rg1_p_l = c_packed.

elseif t_rg1-matform = c_loose.

j_2icomp-rg1_p_l = c_loose.

endif.

j_1irg1-cpudt = t_rg1-cpudt.

j_2icomp-op_qty = t_rg1-op_bal.

j_2icomp-mf_qty = t_rg1-qty_mfr.

j_2icomp-to_qty = t_rg1-total.

j_2icomp-cl_fin = t_rg1-cl_bal_fn.

j_2icomp-cl_bon = t_rg1-cl_bal_bn.

j_2icomp-remarks = t_rg1-remarks.

j_2icomp-h_menge = t_rg1-h_menge.

j_2icomp-h_value = t_rg1-h_value.

j_2icomp-e_menge = t_rg1-e_menge.

j_2icomp-e_value = t_rg1-e_value.

j_2icomp-e_menge_bn = t_rg1-e_menge_bond.

j_2icomp-o_menge = t_rg1-o_menge.

j_2icomp-o_purpose = t_rg1-o_purpose.

j_2icomp-o_pur_meng = t_rg1-o_pur_menge.

j_1irg1-bedrate = t_rg1-bedrate.

j_1irg1-exbed = t_rg1-bedamt.

j_2icomp-cl_fin = t_rg1-cl_bal_fn.

j_2icomp-cl_bon = t_rg1-cl_bal_bn.

j_2icomp-remarks = t_rg1-remarks.

Accepted Solutions (0)

Answers (2)

Answers (2)

sivakrishna_boddapati
Participant
0 Kudos

we can not get the data from a structure . because we cant store data in structures. we can store data in only tables.

lbreddemann
Active Contributor
0 Kudos

This post is unrelated to MaxDB - maybe checking the ABAP documentation or forums could help you with this.

regards,

Lars