on 02-01-2008 7:02 AM
Hi.
I created an input enabled table in which the user enters the data. On the click "send", the data in the table should be sent as exporting parameter ( which is of type table).
I tried to read the context of the table as
lo_el_directive_pos_ipf->get_static_attributes(
IMPORTING
static_attributes = ls_directive_pos_ipf ).
and tried to assign..but it is not working.
How should i pass the table to the bapi.
Plz help
hi bichoo.......
your bapi might be requiring a table as an input... say the structure of the table is itab....
but you have an input field which has to be passed to this table...say itab-field...
what you can do is ....
read the input field...
let the variable be var1...
now have an internal table that has the same structure of the bapi table..... let it bei tab1...
so wa-field = var1.
append wa to itab1...
now pass this itab to the bapi.
---regards,
alex b justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alex..
This is what i did. The table which the bapi needs is suppose of type "TAB_ORG". So i created an internal table say "TAB_TEMP" with work area as :
DATA : TAB_TEMP LIKE TAB_ORG,
WA LIKE LINE OF TAB_TEMP.
Then i read the column of the tree using wizard and then pass it to work area as:
wa-field = "value read by wizard".
Finally i append wa to TAB_TEMP.
Then i pass this "TAB_TEMP" to the bapi.. but when i run it ..it gives the error
"Type conflict when calling a function module"
Can u plz help
hi bichoo.....
if you need to pass a table... then you should have a table ui element and do so...
or
you could have 3 or 4 input fieldas of the same type bound to different attributes and then read it one by one... append it to the same internal table and tehn pass it to the bapi.
---regards,
alex b justin
That is what i am trying to do.Here is what i have done..
I am reading the attributes of the table using get attribute . After reading all the attributes, i am appending them to an internal table which is passed to the bapi.. But even if i loop it many times also, it always reads the value of the first row only..Here is what i have done
do 3 times.
...
..
read the atrributes of column
..
..
Append to itab.
enddo.
What should i do so that it reads the next column when the do loop is called again???
hi bichoo....
if you are going to use a table.. then you should
not use get_static_attributes...
for it will always return the first row
you should use
get_static_attributes_table...
which will return all the values of the table to the internal table that you pass...
you no need to append.
---regards,
alex b justin
hi bichoo......
for your convenience:
click code wizard... and read the node that is bound to the table.....
you will be having a reference to if_wd_context_node...
and a method that calss get_static_attributes...
now instead of that method give get_static_attributes_table...
and within the brackets give the internal table name....
all teh values will be transfered to the internal table and then you can process it and pass it to the bapi.
---regards,
alex b justin
hi bichoo.......
this is a sample coding:
DATA lo_nd_po TYPE REF TO if_wd_context_node.
DATA lo_el_po TYPE REF TO if_wd_context_element.
DATA ls_po TYPE wd_this->element_po.
data itab type standard table of ekko.
* navigate from <CONTEXT> to <PO> via lead selection
lo_nd_po = wd_context->get_child_node( name = wd_this->wdctx_po ).
* get element via lead selection
lo_el_po = lo_nd_po->get_element( ).
lo_el_po->get_static_attributes_table(
IMPORTING
table = itab ).
.
here lo_nd_po refers to the context node
lo_el_po refers to the child node thta is bound to the table..
---regards,
alex b justin
Hi Muzammil,
to read all context elements, we can use method
IF_WD_CONTEXT_NODE->GET_STATIC_ATTRIBUTES_TABLE( )
Silke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.