I started this already via Twitter how to fetch or map two values from an internal table if you are not interested in the whole line
Input: lt_vbpa (just an internal table with some more columns )
target: lv_kunn (two fields to be filled ... needed for next method or something.
lv_land1
Of cause there are lots of solutions, we could make a list out of it, but key is to have FAST, short an understandable code
Read Table lt_vbpa assigning <fs> Key ...
lv_kunnr = <fs>-kunnr.
lv_land1 = <fs>-land1.
lv_kunnr = lt_vbpa[ parvw = "WE" ]-kunnr
lv_land1 = lt_vbpa[ parvw = "WE" ]-land1
* but worse 2 read operations in ITAB performance issue in mass processing.
Via Twitter I did receive some Ideas:
Read Table ltvbpa assigning <fs> Key ...
assign lt_vbpa[ parvw = "WE" ] to <fs>.
lv_kunnr = <fs>-kunnr.
lv_land1 = <fs>-land1.
* Nicer, one read on the itab only, but still tree lines of code
* Also nicer but quite some coding overhead... and again with the performance issue of two reads.
I still do not see a great Idea to do this in a nice way in two lines of code (pls. no #Macros, or two statemts in one line ideas ...)
Thanks for the two of you for your Ideas!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
2 | |
2 | |
2 |