I need help in uploading header texts while creating sales order using BDC. I know it is not possible in recording mode.
I saw couple of threads to use FM 'CREATE_TEXT' to pass relevant data to it after BDC process done in loop.
DATA: T_LINE LIKE TLINE OCCURS 0 WITH HEADER LINE.
DATA: TDID TYPE THEAD-TDID VALUE 'ZG01',
TDSPRAS TYPE THEAD-TDSPRAS VALUE 'E',
TDNAME TYPE THEAD-TDNAME VALUE '15000126', --> not sure what to pass exactly to this field
TDOBJECT TYPE THEAD-TDOBJECT VALUE 'VBBK'.
T_LINE-TDFORMAT = 'ST'.
T_LINE-TDLINE = 'Text_fld1'.
CALL FUNCTION 'CREATE_TEXT'
FID = TDID
FLANGUAGE = sy-langu
FNAME = TDNAME
FOBJECT = TDOBJECT
SAVE_DIRECT = 'X'
FFORMAT = '*'
FLINES = t_line
NO_INIT = 1
NO_SAVE = 2
OTHERS = 3.
Still my problem is not solved , sales orders are getting created with out header texts.
If there is no solution then only i can change my code to use BAPI.
Please advise me any solution other than BAPI.
Thanks in advance.