Skip to Content

How to get cdpos tabkey into corresponding fields?

Jun 12, 2017 at 05:26 AM


avatar image
Former Member

Hi All,

i need to get corresponding fields from cdpos-tabkey dynamically.

say for example i need to get plant,material etc from tabkey.

i tried so far the below code.

i am getting type conflict error when i use MOVE statement ,

when i use assignment statement , values is getting assign just like variables not like structure format , hence i couldn't able to get exact field from structure.


              DATA ls_data TYPE REF TO data.

            SELECT SINGLE * FROM dd03m INTO ls_dd03m

                   WHERE tabname   = t_cdpos-tabname

                     AND fieldname = 'WERKS'.

              IF sy-subrc = 0.

                    CREATE DATA ls_data TYPE (t_cdpos-tabname).

                     ASSIGN ls_data->* TO <table>.

*                        MOVE-CORRESPONDING t_cdpos-tabkey TO <table>.

*                     <table> = t_cdpos-tabkey.

                     ASSIGN t_cdpos-tabkey to <table>.


anyone please help me to solve.

10 |10000 characters needed characters left characters exceeded
Former Member

Thank you so much , i will follow from now on.

* Please Login or Register to Answer, Follow or Comment.

1 Answer

Mike Pokraka Jun 12, 2017 at 08:46 AM

You seem to be making this overly complicated, is there a particular reason?

Call FM CHANGEDOCUMENT_READ to get change data. If you need to read the corresponding table record from the DB, do:

select single * from (table_name) into data(table_row).
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

To be more clear i need to display change document plant wise , i have got all data's only bottle neck is separating plant and other details from tabkey without using offset method.