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

Badi Declarattion Error.

Former Member
0 Likes
977

Hi Experts

I am doing coding in the IF_EX_BADI_SD_BILLING~INVOICE_DOCUMENT_CHECK

method,

When i do the following code, it says the following error,

DATA : ggoodsmvt_header TYPE STANDARD TABLE OF bapi2017_gm_head_01 WITH HEADER LINE.

Error :

Tables with headers are no longer supported in the OO context.

How to correct and declare the above statement, pls advise me.

Thanks in advance.

Regards

Rajaram

Hi Experts

I am doing coding in the IF_EX_BADI_SD_BILLING~INVOICE_DOCUMENT_CHECK

method,

When i do the following code, it says the following error,

DATA : ggoodsmvt_header TYPE STANDARD TABLE OF bapi2017_gm_head_01 WITH HEADER LINE.

Error :

Tables with headers are no longer supported in the OO context.

How to correct and declare the above statement, pls advise me.

Thanks in advance.

Regards

Rajaram

5 REPLIES 5
Read only

former_member673464
Active Contributor
0 Likes
869

hi Ram,

Tables with header lines are not supported in OOABAP.So you have declare a table and header line( work area) seperately .I hope there will not be any error if you declare like that.

Regards,

Veeresh

Read only

0 Likes
869

Then how to declare the header table yar,

pls advise me.

Read only

0 Likes
869

Hi,

Declare your table without header line and declare a work area to use instead of header line.

Regards,

Soumya.

Read only

mvoros
Active Contributor
0 Likes
869

Hi,

generally tables with header line are obsolete. So you have to define structure which you will use as a header line


DATA : ggoodsmvt_header TYPE STANDARD TABLE OF bapi2017_gm_head_01,
            ggoodsmvt_header_line TYPE api2017_gm_head_01.

Read only

Former Member
0 Likes
869

Hi,

In OO ABAP programming you cannot use tables with names the same as the header line. Also you should use TYPE instead LIKE.

see the help

http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb36a1358411d1829f0000e829fbfe/content.htm

Regards

Kiran Sure