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

hi conca

Former Member
0 Likes
756

hi

can one one explain me following syntax

data: w_num(2) TYPE n,

w_str(15) TYPE c.

CONCATENATE 'KOMGG-KUNNR(' w_num ')' INTO w_str.

it is combining two fields, but my query here is what if w_num has more than 99 number.

i would like to know about w_num i mean what it is indicating here.

this code is used in bdc.

thanx

hi

can one one explain me following syntax

data: w_num(2) TYPE n,

w_str(15) TYPE c.

CONCATENATE 'KOMGG-KUNNR(' w_num ')' INTO w_str.

it is combining two fields, but my query here is what if w_num has more than 99 number.

i would like to know about w_num i mean what it is indicating here.

this code is used in bdc.

thanx

5 REPLIES 5
Read only

Former Member
0 Likes
716

hi Rocky ..


data: w_num(2) TYPE n value '2',
w_str(15) TYPE c.

CONCATENATE 'KOMGG-KUNNR(' w_num ')' INTO w_str.

write w_str.

Output..

<b>KOMGG-KUNNR(02)</b>

Reward if this helps..

Regards,

Santosh

Read only

Former Member
0 Likes
716

hi,

w_num indicates to the number of lines in the table control u see on the screen. it cannot be 99 because we dont have such a big screen where we can accomadate 100 lines in a table control hence we can safely use w_num of length 2.

hope that helps.

santhosh

Read only

Former Member
0 Likes
716

If the W_NUM is more than 99, the variable will store only the last two digits hence for 100 it would be indicating 00.

so if W_NUM = 100 the result of the below statement is

KOMGG-KUNNR(00) is the value for w_str.

Regards

Anurag

Read only

Former Member
0 Likes
716

Hi Rocky,

I think this is taking the offset for the field KOMGG-KUNNR , suppose say KUNNR value is 1234567 , and w_num value is 3 , then it will take the first three charaters 123 in to w_str.

there is no chance of nore than 99 , as maximum kunnar length doesnt exceed 99

Read only

Former Member
0 Likes
716

hi

try this declaration;

data: w_num(3) TYPE n

thanks

pavan