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

SLIN message...

Former Member
0 Likes
527

Hello Gurus,

When I try to do extended check through SLIN, I get following message.

Can someone please help me on how to code otherwise for the subroutine to not get that message.

The current ABAP command is obsolete Within classes and interfaces, you can only use "TYPE" to refer to ABAP Dictionary

types, not "LIKE" or "STRUCTURE". Internal Message Code: MESSAGE G/B (The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET EXTENDED CHECK OFF/ON)

DATA:  l_ret TYPE bapiret2,
             li_ord_items_in
TYPE STANDARD TABLE OF bapisditm.

DATA: li_order_items_in TYPE STANDARD TABLE OF bapisditm.



PERFORM SALES_DOCUMENT_CREATE TABLES li_ord_items_in
                                                                      
USING l_ret.

FORM SALES_DOCUMENT_CREATE  TABLES   P_LI_ORDER_ITEMS_IN STRUCTURE bapisditm
                                                                
USING   P_L_ORDER_HEADER_IN.


ENDFORM.                    "SALES_DOCUMENT_CREATE

Regards,

T S

3 REPLIES 3
Read only

Former Member
0 Likes
458

declare internal table type,

Types: ty_order_items type standard table of bapisditm.

DATA:  l_ret TYPE bapiret2,

             li_ord_items_in TYPE STANDARD TABLE OF bapisditm.

DATA: li_order_items_in TYPE STANDARD TABLE OF bapisditm.

PERFORM SALES_DOCUMENT_CREATE TABLES li_ord_items_in

                                                                       USING l_ret.

FORM SALES_DOCUMENT_CREATE  TABLES   P_LI_ORDER_ITEMS_IN type ty_order_items

                                                                 USING   P_L_ORDER_HEADER_IN.

ENDFORM.                    "SALES_DOCUMENT_CREATE

Read only

0 Likes
458

Hello TS,

Please refer below code :

Types: ty_order_items type standard table of bapisditm.

DATA:  l_ret TYPE bapiret2,

             li_ord_items_in TYPE STANDARD TABLE OF bapisditm.

DATA: li_order_items_in TYPE STANDARD TABLE OF bapisditm.

PERFORM SEALES_DOCUMNT_CREATE USING l_ret CHANGING li_ord_items_in.

FORM SALES_DOCUMENT_CREATE  USING   P_L_ORDER_HEADER_IN

                                                          CHANGING   P_LI_ORDER_ITEMS_IN type ty_order_items.

ENDFORM.                    "SALES_DOCUMENT_CREATE

Do not use TABLES because it is absolute .

You can pass internal table BY USING or CHANGING as per your requirement.

For internal tables always use table types. Do not use LIKE as it is absolute.

Give point if it is helpful.

-- Santosh

Read only

Former Member
0 Likes
458

Hi,

Please delcare the Internal table P_LI_ORDER_ITEMS_IN at the top of the program. So this can be accessed at any time in the program. So you can remove the TABLES Parameter in the Subroutine.

Thanks & Regards,

Sumodh.P