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

TR_OBJECTS_INSERT not working

Former Member
0 Likes
1,782

Hi All,

I am using the Function Module 'TR_OBJECTS_INSERT' to assign entries made in a Z table to a transport request.I am giving the following data.But the FM is giving error "Invalid call sequence for interfaces when recording changes".what could be wrong?

ko200-as4pos = 000000

ko200-pgmi = R3TR

ko200-obje = TABU

ko200-OBJ_name = ZTABLE

XKO200-OBJFUNC = 'K'.

e071k-pgmi = R3TR

e071k-obje = TABU

e071k-objname = ZTABLE

e071k-as4pos = 000000

e071k-mast = tabu

e071k-mastername = ZTABLE

XE071K-SORTFLAG = '2'.

1 REPLY 1
Read only

Former Member
0 Likes
967

The code is OK

But in the middle why X's are coming

ko200-as4pos = 000000

ko200-pgmi = R3TR

ko200-obje = TABU

ko200-OBJ_name = ZTABLE

<b>XKO200-OBJFUNC = 'K'.</b>

e071k-pgmi = R3TR

e071k-obje = TABU

e071k-objname = ZTABLE

e071k-as4pos = 000000

e071k-mast = tabu

e071k-mastername = ZTABLE

<b>XE071K-SORTFLAG = '2'.</b>

Use only one thing based on Your Data Declarations....

Here os the sample code...

DATA: BEGIN OF LIST_OF_TABLES OCCURS 1.

INCLUDE STRUCTURE KO200.

DATA: END OF LIST_OF_TABLES.

CLEAR LIST_OF_TABLES. REFRESH LIST_OF_TABLES.

LOOP AT E071_TAB.

MOVE-CORRESPONDING E071_TAB TO LIST_OF_TABLES.

APPEND LIST_OF_TABLES.

ENDLOOP.

IF CORR_ACTIV = 'X' OR CORR_CATEGORY = 'SYST'.

CALL FUNCTION 'TR_OBJECTS_INSERT'

EXPORTING

WI_ORDER = CORR_NO

TABLES

WT_KO200 = LIST_OF_TABLES

WT_E071K = E071K_TAB

EXCEPTIONS

CANCEL_EDIT_OTHER_ERROR = 35

SHOW_ONLY_OTHER_ERROR = 36

OTHERS = 37.

IF SY-SUBRC NE 0.

MESSAGE ID SY-MSGID

TYPE 'I'

NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDIF.

Reward if helpful...