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

BAPI : assign data element length&type, to local variable

Former Member
0 Likes
590

Hi all ,

i have used bapi structure BAPIKNA101_1 in that table field is TABLE_P,TABLE_P data element is AD_TITlETX.

im creating new variable V_TITLE and also i want assign AD_TITLETX length and type to V-TITLE variable, i have decalred the variable but i'cant assign the variable length and type how to assign to it ?

these lines throws some errors :

DATA : V_TITLE type AD_TITlETX,

V_TITLE(30) TYPE C.

AD_TITLETX length : 30.

AD_TITLETX type : char

1 ACCEPTED SOLUTION
Read only

former_member200872
Active Participant
0 Likes
538

Hi,

You cannot change the length or type of a data element in a program.

When you code as below:

DATA : V_TITLE type BAPIKNA101_1-TABLE_P.

You mean to say that v_title refers to relevant structure's field (whose tech. attributes type & length are in the domain mentioned).

Hope you are clear about this.

Regards,

Wajid Hussain P.

3 REPLIES 3
Read only

former_member200872
Active Participant
0 Likes
539

Hi,

You cannot change the length or type of a data element in a program.

When you code as below:

DATA : V_TITLE type BAPIKNA101_1-TABLE_P.

You mean to say that v_title refers to relevant structure's field (whose tech. attributes type & length are in the domain mentioned).

Hope you are clear about this.

Regards,

Wajid Hussain P.

Read only

0 Likes
538

Hi,

Wajiid thanks for ur reply.

Read only

0 Likes
538

Thanks for rewarding.

Regards,

Wajid Hussain P.