Skip to Content
0
Former Member
Jan 09, 2008 at 08:28 PM

About routing text read using fm CP_EX_PLAN_READ

671 Views

Hi,

I am writing a program to copy routing from one plant to another. Everything works great except for long text. I did search the forum but could not find any helpful tips.

1> I am reading the routing using fm CP_EX_PLAN_READ

CALL FUNCTION 'CP_EX_PLAN_READ'

EXPORTING

cmode_imp = 'R'

plnty_imp = wa_rthd-plnty

plnnr_imp = wa_rthd-plnnr

plnal_imp = wa_rthd-plnal

sttag_imp = wa_rthd-datuv

TABLES

plpo_exp = lt_plpo_exp

pltx_exp = lt_pltx_exp

Even though header and operations has long text, table lt_pltx_exp is not getting populated (lt_plpo_exp is getting right data). Any idea why this would happen?

2> Once I successfully get the long text then what all is the mapping to populate the structure BAPI1012_TXT_HDR_C & BAPI1012_TXT_C, as I am using BAPI_ROUTING_CREATE to create the routing in the new plant.

CALL FUNCTION 'BAPI_ROUTING_CREATE'

EXPORTING

testrun = lh_testrun

IMPORTING

group = lh_group

groupcounter = lh_groupcounter

TABLES

task = t_rthd_bapi_n

materialtaskallocation = t_rtma_bapi_n

operation = t_rtop_bapi_n

  • textallocation = t_rtxo_bapi_n

  • text = t_rttx_bapi_n

return = t_rt_ret.

Any feed back is greatly appreciated.