cancel
Showing results for 
Search instead for 
Did you mean: 

Add Suffix beside PO No Display on form

jjay
Participant
0 Kudos

Hi Experts,

Would need your guide as am new to SAPSCRIPTS & SAPFORMS. I am currently customising the "ZZMEDRUCK"form to cater some changes to the form display. I am not sure where or how should I add the logic to include this suffix "XX" behind the PO No print, for eg:

Purchase Order No: 4510009822 will have 4510009822US during display.

How can I modify the program to concatenate these extra 2 characters?Please help.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

jjay
Participant
0 Kudos

Hey Guys,

Thanks so much for the input.

I included the chunk of code in an existing subroutine pool but I dont c any changes to the PO display at all.

/: PERFORM F_CONCAT_OS IN PROGRAM ZZPOOTPUT_ROUTINE

/: USING &EKKO-EBELN&

/: CHANGING &EBELN_NEW&

/: ENDPERFORM

/: IF &T001-BUKRS& EQ 'JP20'

= <A2>,,: </><PO>&EBELN_NEW&</>

/: ELSE

= <A2>,,: </><PO>&EKKO-EBELN&</>

/: ENDIF

What could i be missinn?Could it probably be the logical operator sign "=" instead of EQ?well am debuging now to check the results....

Former Member
0 Kudos

Hi Neesha,

Debug the script. you will come to know the reason whether the condition is satisfied or not.

Regards,

karthikeyan k s.

jjay
Participant
0 Kudos

got it done!!!thank so much peepz...cheers

Answers (1)

Answers (1)

Former Member
0 Kudos

Hai,

you can achieve with use of perform statement in your script.

/: perform concatenate in program ztest

/:using ekko-ebeln

/:changing ebeln_new

in program ztest.

form concatenate using in_par structure itcsy

changing out_par structure itcsy.

data : ebeln type ebeln,

ebeln_new type string.

read table in_par with key 'ebeln'.

ebeln = in_par-value.

concatenate ebeln 'us' into ebeln_new.

read table out_par with key 'ebeln_new'.

out_par-value = ebeln_new.

modify out_par index sy-tabix.

/: perform concatenate in program ztest

/:using ekko-ebeln

/:changing ebeln_new

  • ebeln_new " it will print concatenated string

jjay
Participant
0 Kudos

Hi Karthik,

Can we include this in the Print Program?

alex_cook
Active Participant
0 Kudos

Howdy,

You probably can but it is better to get used to doing these types of things in a subroutine pool as per Karthik's suggestion as it is quite common in SAPscripts.

To do it in the print driver program is going to be an enhancement or modification and so the subroutine pool is a preferred option.

Check to see if there is already a subroutine pool defined for you ZZMEDRUCK form, ie you can look through the code on each of the windows and search for the syntax "PERFORM <some_subroutine> IN PROGRAM <subroutine_pool_name>". If you find it then just use the already defined subroutine pool and create a new subroutine to do your concatenation.

Cheers

Alex

Former Member
0 Kudos

Hi Neesha,

IF you want to include the standard driver program you can use alex suggestion . Otherwise just create one zprogram there u can write the coding . this is very simple.

Regards,

Karthikeyan k s,