2007 Mar 05 5:18 PM
Hi experts,
My ABAP skills aren't very advanced ...
I have a local structure which I have filled with info from a Web Service:
importing
get_webservice_response = ls_response.This structure has two elements, the second of which interests me and is a table called get_webservice_return:
lt_mytable = ls_response-get_webservice_return.So far so good, by doing this lt_mytable is the same as the table returned by the webservice. (It is a dynamic table which, depending on the returned results, can have zero lines or however many lines as there are results)
Now in that table, there is first a controller then there are values like firstname, lastname, company, zipcode etc...
I tried to do something like:
lv_zipcode = lt_mytable-zipcode.etc, but I get an error saying "LT_MYTABLE is a table without a header line and therefore has no component called ZIPCODE".
What should I have done?
How can I pass the values of a line to another structure ?
How can I pass the values of a column to another structure ?
In Web Dynpro I have a context with the same values as the lt_mytable, how do I pass all the values of the lt_mytable into the context nodes?
Thanks everyone,
Micol
2007 Mar 05 5:22 PM
Hi experts,
My ABAP skills aren't very advanced ...
I have a local structure which I have filled with info from a Web Service:
importing
get_webservice_response = ls_response.This structure has two elements, the second of which interests me and is a table called get_webservice_return:
lt_mytable = ls_response-get_webservice_return.So far so good, by doing this lt_mytable is the same as the table returned by the webservice. (It is a dynamic table which, depending on the returned results, can have zero lines or however many lines as there are results)
Now in that table, there is first a controller then there are values like firstname, lastname, company, zipcode etc...
I tried to do something like:
lv_zipcode = lt_mytable-zipcode.etc, but I get an error saying "LT_MYTABLE is a table without a header line and therefore has no component called ZIPCODE".
What should I have done?
How can I pass the values of a line to another structure ?
How can I pass the values of a column to another structure ?
In Web Dynpro I have a context with the same values as the lt_mytable, how do I pass all the values of the lt_mytable into the context nodes?
Thanks everyone,
Micol
2007 Mar 05 5:22 PM
2007 Mar 05 5:24 PM
Hi,
You have to create a work area and move the values to the work area to get a value..
DATA: T_MARA TYPE STANDARD TABLE OF MARA.
DATA: WA TYPE MARA.
READ TABLE T_MARA INTO WA INDEX 1.
WRITE: / WA-MATNR.
Thanks,
Naren
2007 Mar 05 5:46 PM
Hi
You can read the internal table on the basis of their Index Number
syntax is :
Read table <table-name> Index <Index-no>.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |