11-25-2015 11:09 AM
Hello everyone,
I want to pass what i have in my internal table to a ZTable, plus 3 select options fields.
My Ztable has 8 fields, 5 of tham are the exact same of the it table and the other 3 are the same i have in the select options.
The select options fields are a Name a Date and ID Number. So for every line of the it table i pass to the ZTable i want to pass the 3 fields of the select options aswell. Something like this:
Name Date IDNumber ittablefield1 ittablefield2 ittablefield3 ittablefield4 ittablefield5
Test 25112015 123456 item2xxxxx xxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxx
Test 25112015 123456 item2xxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxxxxxxx
Test 25112015 123456 item2xxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxxxxxxx
Note that the only fields that have the same value in every line are the select options ones, the others change depending on the info they have in the
it table.
Regards
Miguel Barao
11-25-2015 11:36 AM
Hi,
Can't you have an internal table in which you have Name Date and ID Number along with the five fields you already have in this internal table.
Also you can easily built this logic like below.
data : wa_ztable type ztable.
loop at it_table into wa_ittable.
wa_ztable-name = name. " this is your select option name.
wa_ztable-date = date . "this is your select option date.
wa_ztable-idnumber = idnumber . "this is your select option id number.
wa_ztable-field1 = wa_ittable-field1.
wa_ztable-field2 = wa_ittable-field2.
wa_ztable-field3 = wa_ittable-field3.
wa_ztable-field4 = wa_ittable-field4.
wa_ztable-field5 = wa_ittable-field5.
insert ztable from wa_ztable.
"You can also use modify ztable from wa_ztable.
endloop.
Hope this helps.
11-25-2015 11:36 AM
Hi,
Can't you have an internal table in which you have Name Date and ID Number along with the five fields you already have in this internal table.
Also you can easily built this logic like below.
data : wa_ztable type ztable.
loop at it_table into wa_ittable.
wa_ztable-name = name. " this is your select option name.
wa_ztable-date = date . "this is your select option date.
wa_ztable-idnumber = idnumber . "this is your select option id number.
wa_ztable-field1 = wa_ittable-field1.
wa_ztable-field2 = wa_ittable-field2.
wa_ztable-field3 = wa_ittable-field3.
wa_ztable-field4 = wa_ittable-field4.
wa_ztable-field5 = wa_ittable-field5.
insert ztable from wa_ztable.
"You can also use modify ztable from wa_ztable.
endloop.
Hope this helps.