05-29-2007 3:17 PM
I have a few db fields of type quan that I am trying to put into my form. When I view the output (preview or print) all fields of type quan are right-aligned. I have the paragraph format (via smartstyles) as left-aligned but these fields (and only these fields) are right aligned. Is there any way to get the quan types left-aligned?
Regards,
Davis
05-29-2007 3:58 PM
Hi Davis,
Just before specifying the field in the text element, u need the insert a program code line.
Suppose u need to condense itab-vbeln
In the input parameters, give itab
in output parameters give a field quant which has been declared as char type and declared in global definitions.
Add the code as follows
quant = itab-vbeln.
condense quant.
Now pass this variable 'quant' for displaying in the smartform.
Reward points if useful
05-29-2007 3:19 PM
Pass these fields to Char Variable before displaying.
Then apply your font format.
Regards,
Amit
Reward all helpful replies.
05-29-2007 3:19 PM
Hi,
You need to move these fields to a Charecter type fields then print those charecter fields then it will be left aligned
Regards
Sudheer
05-29-2007 3:21 PM
05-29-2007 3:41 PM
before displaying the quantity field in the Test Node add a Program lines code and write something like this -
move itab-quan to v_quan.
import parameters - v_quan & itab-quan
export - v_quan.
in global data: difine v_quant as char10.
Regards,
Amit
05-29-2007 3:46 PM
Amit, thanks for the reply.
I tried that and I am still getting the same error "Field GS_VBLKP-LFIMG is unknown".
For some reason every time I try to use GS_VBLKP_LFIMG in a Program Lines node I get an error on that field.
Regards,
Davis
05-29-2007 3:25 PM
I tried your solution, in a Program Lines node, and I got a syntax error. The error says "Field &GS_VBLKP-LFIMG& is unknown. I am using this field all over my form but it doesn't like it here. Below is the code that I put in the Program Lines node:
w_lfimg = &gs_vblkp-lfimg&.
Regards,
Davis
Message was edited by:
Davis
05-29-2007 3:25 PM
Hi,
Please try something like this and define v_kbetr as a charecter type.
&v_kbetr(L)&
Regards,
Ferry Lianto
05-29-2007 3:33 PM
Hi Ferry,
I am having trouble betting the value into a character field. Please see my post above. When I try to use the field &GS_VBLKP-LFIMG& I get a syntax error (only in a Program Lines node).
Regards,
Davis
05-29-2007 3:37 PM
Hi,
Please try this.
data: w_lfmig(13) type c.
w_lfimg = gs_vblkp-lfimg.
...
&w_lfmig(L)&
Regards,
Ferry Lianto
05-29-2007 3:40 PM
Ferry,
It still gives me a error saying that "Field GS_VBLKP-LFIMG is unknown". I don't understand this because I am using this field in other parts of my form (but only in text nodes). Should I not put this in a Program Lines node?
Regards,
Davis
05-29-2007 3:47 PM
Hi Davis,
Did you declare gs_vblkp-lfimg in global data?
Regards,
Ferry Lianto
05-29-2007 4:04 PM
Ferry,
I have GS_VBKLP (a work area for VBLKP) declared as a global type.
Regards,
Davis
05-29-2007 4:08 PM
Hi davis,
import and export this variable 'gs_vblkp-lfimg ' in the program lines i.e mention this variable in input and output parameters.
Regards,
Vidya.
05-29-2007 3:58 PM
Hi Davis,
Just before specifying the field in the text element, u need the insert a program code line.
Suppose u need to condense itab-vbeln
In the input parameters, give itab
in output parameters give a field quant which has been declared as char type and declared in global definitions.
Add the code as follows
quant = itab-vbeln.
condense quant.
Now pass this variable 'quant' for displaying in the smartform.
Reward points if useful
05-29-2007 4:09 PM
Anoop,
Thank you so much for that post! That did the trick. I forget to add input and output parameters because the window is centered and the input and output parameters do not show unless you scroll up. Thanks so much for your help!
Regards,
Davis