Skip to Content
0
Oct 29, 2009 at 10:14 PM

Problem in uploading Header texts in Sales order using BDC

60 Views

Hi All,

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'.

APPEND T_LINE.

CALL FUNCTION 'CREATE_TEXT'

EXPORTING

FID = TDID

FLANGUAGE = sy-langu

FNAME = TDNAME

FOBJECT = TDOBJECT

  • SAVE_DIRECT = 'X'

  • FFORMAT = '*'

TABLES

FLINES = t_line

EXCEPTIONS

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.

-Siva