‎2010 May 05 8:28 AM
Dear all,
i have taken one varible with type string.
but some data are cut out.
because length of data must be length of 300 approx.
can you suggest me that what type i declared varible.
that print the length of 300
plz reply me
‎2010 May 05 8:29 AM
‎2010 May 05 9:07 AM
in debug...........
in printing no problem because i have taken table
‎2010 May 05 8:31 AM
‎2010 May 05 9:04 AM
Talke an example
DATA:L_VAR TYPE char300.
DATA:BEGIN OF I_TAB OCCURS 0,
S TYPE STRING,
END OF I_TAB.
DO 30 TIMES.
I_TAB-S = 'Shalini-19'.
append I_TAB.
ENDDO.
loop at I_TAB.
CONCATENATE L_VAR I_TAB-S INTO L_VAR.
ENDLOOP.
Edited by: Shalini Singh on May 5, 2010 10:04 AM
‎2010 May 05 9:08 AM
Hi shailini
the problem is here
CONCATENATE L_VAR I_TAB-S INTO L_VAR.
you're trying to concatenate a char300 + string into a char300.....
is normal that it will take only the first 300 char.....
regards
Marco
‎2010 May 05 9:09 AM
Well then check this
report ztest line-size 1023. " Add the required line size here
DATA:L_VAR TYPE string.
DATA:BEGIN OF I_TAB OCCURS 0,
S TYPE STRING,
END OF I_TAB.
DO 50 TIMES.
I_TAB-S = 'Shalini-19'.
append I_TAB.
ENDDO.
loop at I_TAB.
CONCATENATE L_VAR I_TAB-S INTO L_VAR.
ENDLOOP.
write: l_var.
Vikranth
‎2010 May 05 9:12 AM
I_TAB containing 30 line items of field Shalini-19.
Then, total character is 300.
but data print only 255.
plz. aplly it as a code and run.
‎2010 May 05 9:16 AM
But i want to print this variable through Smartform in table row.
‎2010 May 05 9:16 AM
Its because of the line-size addition in the report statement. Add the line-size like in my sample and check.
‎2010 May 05 9:18 AM
Hi shalini
use
DATA:L_VAR TYPE string.i've tried and it work
if you want to print L_VAR into a smartforms, you must check
that the width of the window and od the table
can contain 300 and more char......
Marco
‎2010 May 05 9:43 AM
In Smartform its not working.......................................Take an Example
REPORT ZTEST line-size 1023.
DATA: fmname TYPE rs38l_fnam.
DATA:L_VAR TYPE string.
DATA:BEGIN OF I_TAB OCCURS 0,
S TYPE STRING,
END OF I_TAB.
DO 50 TIMES.
I_TAB-S = 'Shaliniii-19'.
append I_TAB.
ENDDO.
loop at I_TAB.
CONCATENATE L_VAR I_TAB-S INTO L_VAR.
ENDLOOP.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZTEST_smart'
IMPORTING
FM_NAME = fmname
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION fmname
EXPORTING
L_VAR = L_VAR
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5 .
‎2010 May 05 9:51 AM
>
> In Smartform its not working
As suggested check if the page width & window size is capable of accommodating the data.
‎2010 May 05 10:13 AM
‎2010 May 05 8:54 AM
Hi check the below code in which i'm storing 1000 characters.
DATA: fs_output1(1000) TYPE c.
CONCATENATE 'Parent Company Name'
'Shipping Point'
'Shipping City'
'Shipping State'
'Invoice'
'Invoice date'
'Sold To Customer'
'Sold To Customer Name'
'Sold To Customer Address1'
'Sold To Customer Address2'
'Sold To Customer City'
'Sold To Customer State'
'Sold To Customer Zip'
'Ship To Customer'
'Ship To Customer Name'
'Ship To Customer Address1'
'Ship To Customer Address2'
'Ship To City'
'Ship To State'
'Ship To Zip'
'Product'
'Product Description'
'Distributors Lot'
'Qty Shipped'
'Unit of Qty shipped'
'Unit of Measure for Calc'
'Qty in Gallons'
'Sales Order'
'Customer PO'
'Delivery'
'Service Partner ID'
into fs_output1 SEPARATED BY space.
write: fs_output1.
In this you can see fs_output1 will be holding 1000 characters.
when you see the output in this only 255 characters will be displayed if u write line-count 1023 in report statement then all the 1000 characters will be displayed. Orelse if u r sending the 300 characters into a file then no need to declare that line-count even.
Regards
VEnk@
‎2010 May 05 8:56 AM
A string can hold 2 GB of data, thats for sure not the problem. Maybe your spool is cut due to your report settings,
‎2010 May 05 8:57 AM
Hi shalini
define your varible of type char300.
DATA: my_var TYPE char300.
Best regards
Marco