Hi,
Very strange problem. I have the program below;
When I run it , I would expect ls_business_object-Value
to have the contents of header , but it does not, when I look at it in the debugger. It adds the element, but there is nothing in value.
Can't really understand why. I've done this with many other programs without any problem. Thanks.
REPORT test.
data:
ls_business_object TYPE swcont,
lt_business_object TYPE TABLE OF swcont,
HEADER type BAPISDHD1,
HEADER-REFOBJTYPE = ''.
HEADER-DOC_TYPE = 'TA'.
HEADER-SALES_ORG = '1000'.
HEADER-DISTR_CHAN = '10'.
*l_ORDER_HEADER_IN-DIVISION = '00'.
HEADER-PURCH_NO_C = '1234567'.
HEADER-PURCH_DATE = '20050531'.
Pack into swcont
ls_business_object-element = 'HEADER'.
ls_business_object-Value = HEADER.
APPEND ls_business_object TO lt_business_object.