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

how to split pack code value from its description

Former Member
0 Likes
381

Hi experts,

I have a Pack Code value in master data as Pack Code value : 320 and Description : 20LT. I want to use actual value of Pack code ie 20 Ltrs. But I don't know how to split 20LT value into 20 & LT.I tried SPLIT function with SPACE but most of the values in MASTER DATA ARE WITHOUT SPACE. I am trying to write this code in BW3.5. Please help me..

Regards,

Priyanka Joshi

2 REPLIES 2
Read only

Former Member
0 Likes
360

is it that unit in the end will always be 2 digit?

Then you can do this way

len = strlen( des ) - 2.
field1 = des+0(len).
field2 = des+len(2).

provide with some test data if this is not the case.

Regards,

Lalit Mohan Gupta.

Read only

0 Likes
360

I could solve the problem using SHIFT & SPLIT functions and some code in abap.