on 11-19-2010 10:02 AM
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.
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....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.