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

concatenate fields with doc number

Former Member
0 Likes
1,069

HI

In cv01n tcode in second tab ADDITIONAL data we have 3 inputs -category,sub category and sub type . now i need to concatenate these three when document no is created .

doc number generation i created but how to concatenate these 3 filds and displayed when clicked saved button. Those 3 fields of type char.

please help me out . automatic doc no is generating i wrote tht in stndard program zmcdokznr ..help me in writing the code to concatenate these 3 fields .

THANKS in advance

HI

In cv01n tcode in second tab ADDITIONAL data we have 3 inputs -category,sub category and sub type . now i need to concatenate these three when document no is created .

doc number generation i created but how to concatenate these 3 filds and displayed when clicked saved button. Those 3 fields of type char.

please help me out . automatic doc no is generating i wrote tht in stndard program zmcdokznr ..help me in writing the code to concatenate these 3 fields .

THANKS in advance

7 REPLIES 7
Read only

Former Member
0 Likes
989

Hello Pannem,

Try using statement Concatenate for doing so. Use F1 help on keyword "Concatenate" for more options on it.

Hope this will be helpful !

Regards,

M M Jaffer.

Read only

0 Likes
989

i used concatenation but those three fields are getting 000000

Read only

0 Likes
989

HI,

Did you check in debug what values are you getting in the three variables ?

category sub_category sub_type

And are you concatenating the document no also ?

Check in debug ..

Regards,

Madhukar Shetty

Read only

0 Likes
989

if you are getting that 0s in one of those varibales then delete those 0 before contatenate...

like

SHIFT varibale LEFT/Right DELETING/TRAILING LEADING '0'.

Edited by: Sachin Bidkar on Dec 2, 2010 8:31 AM

Read only

Former Member
0 Likes
989

Hi

you need to declare a variable of character type with the length equal to the some of lengths of category, sub category and sub type,

then after saving the object number use 'concatenate' statement to concatenate the values into that variable and display that variable.

like:

concatenate category sub_category sub_type into v_variable without separator.

thanks

lalit

Read only

Former Member
0 Likes
989

Hi,

DATA:LV_FLD1 TYPE STRING,

LV_FLD2 TYPE STRING,

LV_FLD3 TYPE STRING.

DATA:LV_FINAL TYPE STRING.

LV_FLD1 = category, "CATAGORY INPUT VALUE.

LV_FLD2 = sub category "SUB CATEGORY VALUE.

LV_FLD3 = sub type "SUB TYPE VALUE.

IF DOUCMENT NUMBER IS CREATED.

CONCATENATE LV_FLD1 LV_FLD2 LV_FLD3 INTO LV_FINAL.

ENDIF.

regards,

muralii.

Read only

0 Likes
989

hi thanks murali,

IN cv01n second screen second tab we have additional fields ...we have three fields(these are created by functiobnal consultants) i need to know field names of these three...we have standard program MCDOKZNR . in tht program include cv_constants.

how to find