Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

To read table control values at runtime while running BDC for XD02

Former Member
0 Likes
574

Hi,

Im using the Transaction code XD02 to change the details of a customer based on the details in the spreadshhet. I have written a BDC for this.

There can be more than one Unloading Points for a customer, but only one will be checked as default Unloading point. I need to modify only that unloading point which is Checked as Default. I need to identify the default unloading point at runtime while running BDC to update it.

Please let me know how to do this.

Thanks in advance.

Hi,

Im using the Transaction code XD02 to change the details of a customer based on the details in the spreadshhet. I have written a BDC for this.

There can be more than one Unloading Points for a customer, but only one will be checked as default Unloading point. I need to modify only that unloading point which is Checked as Default. I need to identify the default unloading point at runtime while running BDC to update it.

Please let me know how to do this.

Thanks in advance.

3 REPLIES 3
Read only

Former Member
0 Likes
507

Query the Table KNVA. Pass KUNNR to get multiple ABLADs (Loading or Unloading points).

Regards,

Ravi

Read only

Former Member
0 Likes
507

i have done something similar for xk02 . In oder to change the records in a table control u will have to query and find how many records are there and postion the index on that record which has to be changed. i can give u a similar code to find the number of records. You can use some help from the code below

reward with points if found useful

SELECT lifnr banks bankl bankn FROM lfbk INTO TABLE tbl_lfbk_tmp

FOR ALL ENTRIES IN tbl_input

WHERE lifnr = tbl_input-lifnr.

IF sy-subrc = 0.

SORT tbl_lfbk_tmp BY lifnr.

LOOP AT tbl_lfbk_tmp.

AT NEW lifnr.

CLEAR tbl_lfbk-cnt.

tbl_lfbk-lifnr = tbl_lfbk_tmp-lifnr.

ENDAT.

tbl_lfbk-cnt = tbl_lfbk-cnt + 1.

AT END OF lifnr.

APPEND tbl_lfbk.

ENDAT.

ENDLOOP.

ENDIF.

Read only

0 Likes
507

Hi Guys,

Thanks for your response.

Actually I have to update only default unloading point in XD02.

At runtime i have to know the index of the default unloading point so as to pass that index to bdcdata.

For example: If there are three unloading points and the second is checked as default, I have to update the second record.

My query is how to know that the second record is checked as default.

I have tried by selecting data from KNVA, but the records will not be retrived into the internal table in the same as order as they are maintained in the database.

Hope Im clear with my requirement.

Thanks a lot for your response.