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

Doubt regarding the statement declaration within method and endmethod

lakshminarasimhan_n4
Active Contributor
0 Likes
649

Hi,

I have a method and i have coded the below inside the method,

Types : begin of itab,

vbelv type /bic/oizopp_num, " opportunity number

vbeln type /bic/oizquot_num, " quotation number

vbeln_a type /bic/oizord_num, " sales order number

vbtyp_n type /bic/oizvbtyp, " category either A or B or C

end of itab.

Data : it type standard table of itab.

Data : wa_it type line of itab.

Data : it_vbfa type standard table of vbfa.

Data : wa_vbfa type line of vbfa.

Now when i check the syntax of the program i get the error "Type VBFA unknown.".

i am suprised why the standard table declaration is not recognized.

I know that we cannot use "Tables" statement.

Please guide me to resolve the issue.

Regards,

Lakshminarasimhan.N

1 ACCEPTED SOLUTION
Read only

ravi_lanjewar
Contributor
0 Likes
627

Hi,

You can't you like in OOPS. In case of local data declare and you can give the refrence of local data in current scope.

5 REPLIES 5
Read only

MarcinPciak
Active Contributor
0 Likes
627

You are declaring work area incorrectly. Should be either like this


Data : wa_vbfa like line of it_vbfa.

or


data wa_vbfa type vbfa.

Regards

Marcin

Read only

Former Member
0 Likes
627

This message was moderated.

Read only

Former Member
0 Likes
627

This message was moderated.

Read only

ravi_lanjewar
Contributor
0 Likes
628

Hi,

You can't you like in OOPS. In case of local data declare and you can give the refrence of local data in current scope.

Read only

lakshminarasimhan_n4
Active Contributor
0 Likes
627

Actually the code is typed in BI system and BI system does not have table VBFA. Its only available in R3 system. Hence the error.