Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2895

Re: Which is a more efficient or meaningful way of calling methods ?

$
0
0

I think, I have to put it in more simpler words.

 

PATTERN1
CLASS DEFINITION
DATA: LT_BSEG TYPE TABLE OF BSEG.
METHOD METHOD1,   METHOD2.
END DEFINITION
METHOD METHOD1
CALL METHOD2 “ HERE WE DO NOT HAVE TO GIVE EXP/IMP SINCE LT_BSEG IS 
END METHOD1. “ DECLARED IN DEFINITION
METHOD METHOD2.
**SOME CODE USING LT_BSEG.
ENDMETHOD.
PATTERN 2
CLASS DEFINITION
METHOD METHOD1,   METHOD2 IMPORTING LT_BSEG TYPE TABLE OF TY_BSEG.
END DEFINITION
METHOD METHOD1
DATA: LT_BSEG1 TYPE TABLE OF BSEG.
CALL METHOD2 EXPORTING LT_BSEG[] = LT_BSEG1[] “ HERE WE HAVE TO GIVE EXP/IMP
END METHOD1.
METHOD METHOD2.
**SOME CODE USING LT_BSEG.
ENDMETHOD.

Which out of this is more preferable ?



Viewing all articles
Browse latest Browse all 2895

Trending Articles