on 05-03-2011 3:24 PM
in a smartform we pass variables that contain spaces which we don't want to break in a line
for instance
hello my birthday is 27 april 2010
27 april 2010 we absolutely don't want to break like
hello my birthday is 27
april 2010
when I just add it in a text element I can use <31> to prevent breaking only when I pass the value
27<31>april<31>2010 to a variable smartforms doesn't interpretet this correctly
in sapscript you can define elements which can be set to protect so it keeps it together only in smartforms that is also not possible.
is there a neat solution for this in smartforms ??
kind regards
arthur
I have found a sollution myself with the coding below. perhaps the coding can be much easier but that I don't know.
data c1 type c length 1.
data: lv_temp type text18.
c1 = cl_abap_conv_in_ce=>uccp( '00A0' ).
lv_temp = '27_april_2011'.
replace all OCCURRENCES OF '_' in lv_temp with c1.
Edited by: A. de Smidt on May 9, 2011 2:50 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
there is a option called page protection ,which can restrict the text break.
While creating a new text,go to its output-options tab,you can find the page protection checkbox.
Mark the checkbox and check it out.
Jshree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi AD Smith,
Just try to increase you window width, where the text element is residing.
Hope this will help you to resolve the issue & close the thread.
BR,
Vinit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you are using multiple variable on the same line. You can use formatting options like ZC.
for eg &VAR1(ZC)&&VAR2(ZC).
when you put your cursor on VAR1. There are option in the attributes, whether u want to append it to new line or Continue on the similar line
Please check the same for both variables.
Regards.
I have also looked at the parameters that can be passed but there is no parameter which keeps the variable together
http://help.sap.com//saphelp_erp2005/helpdata/EN/1c/f40c64ddf311d3b574006094192fe3/frameset.htm
with ZC it wil also break down half way the variable.
If I click on the variable in the smartform I can't see where I can see the attributes ??
and page protection is for an entire block and not for an individual variable in a sentence.
like a text we have
The Examination Board of the &GS_STUDY_EN-PROGTYPE& in
&GS_STUDY_EN-NAME&, which is accredited on &GV_CONFER_ACCRED_DATE_EN&
declares that
so if the name off the study is to long the date has to be printed entirely on the next line but if the study name is short it has to be printed right after accredited on.
kind regards
Arthur
Edited by: A. de Smidt on May 4, 2011 3:55 PM
Hi ,
>
> I am not sure whether it work or not. One more dirty solution:). Create a varaible with type character . Concatenate the fields you want to print in to the variable you have created. and then try to print.
>
> Regards,
> Vikram Singh.
that doesn't work either
but how can you can transfer special characters in an variable ??
why can't I code ?
wa_temp = '27<31>april<31>2011'.
or is the syntax of the special character wrong ?
kind regards
arthur
I have searched further on but the only sollution I can find is way to dirty
when I find the spaces I can spilt the variable in its parts
&wa_temp(2)&&<31>&&wa_temp+3(5)&
but I can't believe that this is the only sollution to make a non breakable element in smartforms ??
kind regards
arthur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.