How to get a field more than 255 char back in ITCSY stru
I am getting multiple invoice numbers from the calling pg. The calling pring pg is standard, so cannot touch that.
Now in my sapscript, i have to concatenate all invoice numbers and show them.
I had used a perform to do so.
It was fine till now. But recently we found that invoice numbers can be so many as to cross 255 char in total.
How to get it done now? ITCSY struc has limitation of only 255 char .
Please advise.
Thanks in adv
hi,
say for example the number was around 300 characters.... so when you are calling the subroutine pass on 2 variables with two different names say var1 and var2 these both can accommodate around 255 characters each....
now in the subroutine split the values into these two variables....
and in script
&var1[c]&&var2[c]&
this will compress the spaced between them.... hence its similar to concatenate...
Regards,
Siddarth
Similar Messages
-
Is it possible to Create a Long Text Field (more than 255 Char Long)?
Is it possible to Create a Long Text Field (more than 255 Char Long) as like Description field in Service Request Object??
Thanks!Hi
User can only create custom Long text field (255 Charcter) . Currently system does not support custom note creation -
Table field more than 255 characters long
Dear Experts,
I want to create a table field more than 255 chars long
It will be possible through LCHR or LRAW but incase it field contists of data less 255 chars it will result in loss of data.
Plz helpHi,
if you want to create a table field more than 255 chars
then possiable with lchr But you got one warning out put length accepted 255 characters only .
for example .
if you created one field z_name in z table with LCHR AND LENGHT MORE THAN 255 CHARS THEN
U GET ONE WARNING
I.E
Output length (300) larger than maximum output length (255) in screens
Message no. DO269.
Regards ,
sankar
Edited by: bhavanisankar.solasu on Dec 29, 2010 8:32 AM -
Is it possible to create a Large Text Field in OCOD, more than 255 Char?
Is it possible to Create a Long Text Field (more than 255 Char Long) as like Description field in OCOD?
Not at this time.
-
How to display more than 255 chars in background job with ALV Grid ????
Hi All,
I am using ALV grid with OO.
I have used call screen for ALV grid display. I have to display more than 255 characters in width. While running it, I can see the list perfectly.
But in background mode, the list is truncated after 255 chars.
Can anybody help how to send complete list(width more than 255 chars) to spool.
Thanks and Regards,
NehaHi SAP fan,
<b>YES you can run the ALV report in background mode.
To run the report in background do F9 instead of F8, then give immediate and save.
Now goto Sm35 goto job overview and view the job listed
Choose the job and press the spool button. It will show the list created on the next page. When u clcik the list u can see the ALV output.
To see this the job should be in the finished status.
How to define Periodic Jobs
1.Execute transaction SM36
2.Define Job name, Job class, Target server
3.Click on 'START CONDITION' button
4.Click on 'Date/Time' button
5.Enter Scheduled start DATE & TIME. Check mark 'Periodic Job' field. Click on 'Period values' button and select 'Hourly' or 'Dialy' or 'Weekly' or 'Monthly' or Other period and SAVE. Go back to main screen.
6.Click on 'STEPS' button and enter Program name and Variant under box 'ABAP Program'. Click on 'Print Specification' button and enter Printer name under 'Output device' and SAVE
7.Click on SAVE button until you get message on bottom of the screen that describes 'Job XYZ saved with status: Scheduled'.
8.Click on 'Job overview' button or execute SM37 transaction.
9.Select the appropriate 'Job name', 'User name', 'Job Status' & Schedule date under 'Job start condition' and click on 'Execute' button or press F8.
10.You will now see all your scheduled JOBS.
<b>Case: 2</b>
You can Run in Background but make sure it is alv list, not alv Grid FM. if you are uisng alv list not problem , but if you are using alv grid then you can code like this..
if sy-batch = ' '.
call 'REUSE_ALV_GRID_DISPLAY'.
else.
call 'REUSE_ALV_LIST_DISPLAY'.
endif.
if you are using OO alv then write this code..
CALL METHOD cl_gui_alv_grid=>offline
RECEIVING e_offline = off.
IF off IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
ENDIF.
<b>Case: 3</b>
if you are using OO ALV.
Just before creating the custom container check for the following condition.
Batch or Web Reporting
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
CREATE OBJECT o_custcontainer
EXPORTING
container_name = lc_custcontrol
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6
ENDIF.
You can see the output in Spool in transaction SP01.</b>
Good Luck and thanks
AK -
How to transfer data more than 255 char from excel sheet to internal table.
Hello Experts,
I have a requirement where i have a text field in the excel sheet of more than 255 char and need to be updated in the text element. To do that i need to transfer the excel sheet data to an internal table where one of the field is more than 255 char.
in the standard function module it works only upto 255 char. Can you help me if we have some other way to get more than 255 char in the internal table from excel sheet.
Thanks in Advance.
BR,
RaJ.Using .xls, it is not possible transfer data more than 255 characters from excel sheet. However if the excel sheet is saved as Comma Delimited format or Tab Delimited format, then using GUI_DOWNLOAD function module data more than 255 characters can be transferred.
File name should be : .csv (Comma Delimited format) or .txt (Tab Delimited format)
File Type would still remain 'ASC' while calling function module GUI_DOWNLOAD
Also In the internal table declare the field type as String or LCHAR.
Eg:
TYPES: begin of ty_file,
col_a TYPE string,
end of ty_file.
DATA: i_file type standard table
of ty_file
with header line
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\test.csv'
TABLES
DATA_TAB = i_file -
How can I see if my program is for more than one user? We think we have bought in design for more users, but can not find out how to get in for more than one?
If you bought a CC for team, you can log in at http://adobe.com and insert the e-mail that you gave at the moment at the purchase and than you can manage and see you product/plan/team.
If I was not clear you can use the following link to help you solving your issue:
Creative Cloud Help | Manage your Creative Cloud for teams membership
If your not clear about this situation, contact with an agent of Adobe, by chat or phone. Use the following link to see the type of support you have on this matter:
http://adobe.com/getsupport
I think this will help you.
Regards -
A field to be displayed in portal legth of 3 and r/3 more than 255 char
Hi all,
Kindly give me reply, I need to display one structure in portal, in this one field is of length 255 char.
Need to change it to more than 255 characters but it should be display in portal as 3 or 5 char length only, can accept more than 255 char lengtjh.
thanks & regards,
Chandra sekhar.Hi Chandra sekhar,
A similar kind of a probelm is explained in the link below:
Link:
The other requirement of displaying it as 3 - 5 chararcter field in portal can be done by creating the iView as required.
Regards,
Pranav. -
Send an attachment in email with length more than 255 char per line
Hi All,
I have to send an attachment in email with length more than 255 char per line. I dont want to break the line after 255 char and add it in another line.
Please suggest me any function module which can perform this.
Thank you all.I looked at all threads in the forum, there was about 5 or 6 identical questions, but surprise, nobody knows! It seems that SO_NEW_DOCUMENT_ATT_SEND_API1 function module does not allow more than 255 characters by line.
It would surprise me a lot if there is no workaround !
As it is very easy to add any binary attachment which is like a very long line, PDF for example (several kilobytes), via the function module above (lots of examples in the forum), I would advise you to try to use the same way, i.e. use the contents_bin parameter instead of the contents_txt parameter (convert the text into binary) and add the line feeds yourself (okay I know, it's not very smart).
Last thing, this function module is deprecated, and we should use BCS classes, maybe they work better. -
Attach xls file with more than 255 chars
Hi all,
I'm trying to send an .xls file as attachement whose row contains more than 255 chars with FM 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
When preparing the attached table, I tried to separate the tables like this:
loop at itab.
concatenate itab-col_1 itab-col_2 itab-col_3 into it_attach
separted by cl_abap_char_utilities=>horizontal_tab.
append it_attach.
concatenate itab-col_4 itab-col_5 itab-col_6 into it_attach
separted by cl_abap_char_utilities=>horizontal_tab.
append it_attach.
concatenate IT_ATTACH cl_abap_char_utilities=>newline into it_attach.
append it_attach.
endloop.
I am able to send this xls as attachment, but when open it in excel/notepad,
it is so strange that there are so many spaces before the contents itab-col_4 which is unexpected.
It is expected that the file is tab-delimited with continuous column 1-6.
Any things went wrong?
Many Thanks!Thanks.
I tried the first method to convert the byte to string, but a short dumps is resulted,
DATA: con_tab TYPE x,
sep TYPE string.
con_tab = '09'.
CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
EXPORTING
in_xstring = con_tab
IMPORTING
out_string = sep.
so I use back my original method to concatenate the columns as suggested, i.e.
concatenate itab-col_1 tab itab-col_2 tab itab-col_3 tab into it_attach
append it_attach.
concatenate itab-col_4 tab itab-col_5 tab itab-col_6 into it_attach.
append it_attach.
concatenate it_attach cl_abap_char_utilities=>newline into it_attach.
append it_attach.
but the outcome is still the same, i.e. ...many leading space before itab-col_4
any more ideas? Many Thanks -
Hi.. I am using the FM "SO_NEW_DOCUMENT_ATT_SEND_API1" for sending a outlook mail with excel sheet as an attachment.
The records having length upto 255 chars are coming properly in diff rows(which means the carriage return is considered).
But when records have more than 255 chars, then the chars exceeding 255 length are coming in a single row of excel sheet which means the carraige returns are not considered.
Hope my issue is explained clearly....request every one to provide the solution as early as possible.
Regards
NandaHi Nanda,
build your XLS internal table X as usual (more then 255 char). Then format the table
X to a new one Y with line size 255. (You can do your own routine or use the FM SWA_STRING_FROM_TABL and SWA_STRING_TO_TABLE in sequence; sorry but I'm on 4.6C and didn't find a FM in order to format directly the internal table from line size XXXX to the desired line size).
sample code:
t_att_tab with line size 4000 containing the excell data with carriage return and so on
objbin with line size 255 used in FM SO_NEW_DOCUMENT_ATT_SEND_API1
data: d_string type string.
call function 'SWA_STRING_FROM_TABLE'
exporting
character_table = t_att_tab
NUMBER_OF_CHARACTERS =
line_size = 4000
KEEP_TRAILING_SPACES = ' '
CHECK_TABLE_TYPE = ' '
importing
character_string = d_string
exceptions
no_flat_charlike_structure = 1
others = 2
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 'SWA_STRING_TO_TABLE'
exporting
character_string = d_string
APPEND = ' '
line_size = 255
CHECK_TABLE_TYPE = ' '
importing
character_table = objbin
TOTAL_LENGTH =
LINE_SIZE_USED =
LINES_FILLED =
LAST_LINE_LENGTH =
exceptions
no_flat_charlike_structure = 1
others = 2
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
It works!!!
Paolo -
How to get data of more than 100 fields by Bulk API V2.0?
Hi all,
I'm trying to get data from Eloqua by Bulk APIs because of big data.
But my Contact has 186 fields (more than the Bulk export limitation 100). I think I need to get all data by 2 exports.
How could I match 2 parts of a row and join them together?
I'm afraid that any edit of data between the 2 syncs for the 2 exports would make the order different.
E.G.:
1. any record is deleted or edited(make it not matching the filter) after getting data of the first part and before getting the second part, then every one behind it would move up in the second part result.
2. data of some fields (included in both parts) are changed between the 2 syncs, then values of the second part are newest but values of the first part are old.
Any suggestions would be expected.
Thanks,
Biaobhuang -
I don't know that you're ever going to get around the fact that things will change in your database while you're syncing the data. You're going to have to have some way to create exceptions on the sync side.
If I was pushing data from Eloqua to another database and had to deal with the problem of matches changing while I was syncing, I'd create a few extra columns in my database to keep track of sync status for that record. Or create another small table to track the data mapping. Here's how I'd do it.
I'd have two extra columns: 'mapped fields 1' and 'mapped fields 2'. They'd both be datetime fields.
I would only do one set of syncs at a time. First, sync every record for the email + 99 fields. Do the entire list. For each batch, set the datetime of the batch in 'mapped fields 1' column.
I'd then sync all records for email + other 86 fields. Do the entire list again. For this batch, set the datetime of each batch in their 'mapped fields 2' column to now().
For any records that had only 'mapped fields 1' filled, but 'mapped fields 2' was empty, I'd re-run the second Eloqua API query using the email as the lookup value. If no results were returned, I'd delete the row. Otherwise, update and set 'mapped fields 2' to now
For any records that had only 'mapped fields 2', I'd re-run the emails against the first Eloqua API query, fill in the missing data, and set 'mapped fields 1' to the current datetime. If the record wasn't returned, delete the row as it's probably not in the search any longer.
Finally, set 'mapped fields 1' and 'mapped fields 2' to empty for all records, since you know the data is in sync. This will let you use the same logic above on your next sync.
Does that make sense? It's not super clean, but it'll get the job done, unless your syncs are taking a ridiculous amount of time and your data changes super often. -
How to declare a custom field more than 255 characters?
Dear Freinds,
I have custom table where one character field name i want more than 255 characters .....the size of the field i require is 800 .Could any one one let me know how i can increase the size to 800 or is there any way we can declare to size 800 ....as
normally i know is we can declare only 255 character in size, but i heard there is another way around we can declare . Could any one please help me out.
regards
madhuriHi Ruby,
i have tried changing at dataelement level only..byusingthe standrd ie char 2000 , and i have tried other way by creating a custom domain and for the data type i have used char and given size as 2000. Wheniam activating it is aying i can use the size range from 0 to 255 characters only......i have tried by declaring as string the data element ...it has taken as zero size as in the string we can use as many characters i can , but when iam trying to table generator ...it saying i canot declare my field as String .
please help what i can do to solve this issue.
thanks
regards
madhuri -
hi all,
Good morning.
My requirement is to send a report as an excel attatchment to the respective managers mail box. For this I am using the function module SO_DOCUMENT_SEND_API1 as follows.
call function 'SO_DOCUMENT_SEND_API1'
exporting
document_data =
put_in_outbox =
sender_address =
sender_address_type =
commit_work =
tables
packing_list =
object_header =
contents_bin =
contents_txt =
receivers =
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
Here the problem is contents_bin is of type SOLISTI1 which takes max 255 characters, As my report columns occupies more than 400 characters, I am unable to get all the column values in excel attachement.
Can anyone please help me to get all the column values in the excel attachment.
Thanks in Advance.Hi,
Please check the following extract of a sample program I had executed.It deals with how to handle more that 255 chars in excel att in FM SO_DOCUMENT_SEND_API1
Hope this helps....
CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE X VALUE '09'. "OK for non Unicode
data : Begin of wa_output ,
BUFFER(1000) TYPE C, " data to be written into xls format
End of wa_output.
data : gt_output LIKE wa_output OCCURS 0 WITH HEADER LINE.
data : FIELDNAME_OFFSET TYPE I.
Attachement contents
DATA: BEGIN OF wa_att_cont.
INCLUDE STRUCTURE solisti1.
DATA: END OF wa_att_cont.
DATA: lt_att_cont LIKE wa_att_cont OCCURS 0.
data : begin of zdfies occurs 0.
include structure dfies.
data : end of zdfies.
data : begin of it_field occurs 0,
fldname(40) type c,
end of it_field.
data : yfilname like RLGRAP-FILENAME value 'C:\Documents and
Settings\'.
data : ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm.
data : flag type i.
********************************Variables*****************************
DATA: lv_count TYPE i, " count
lv_forwarder LIKE soud-usrnam, " Forwarder.
lv_lines TYPE i. " no of lines
********************************Structures****************************
DATA: w_doc_data LIKE sodocchgi1,
w_sent_all(1) TYPE c,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ.
******Structure for Folder ID
DATA: BEGIN OF wa_folder_id.
INCLUDE STRUCTURE soodk.
DATA: END OF wa_folder_id.
Folder Contents, change attributes
DATA: BEGIN OF wa_object_fl_change.
INCLUDE STRUCTURE sofm1.
DATA: END OF wa_object_fl_change.
******Object definition, change attributes
DATA: BEGIN OF wa_object_hd_change.
INCLUDE STRUCTURE sood1.
DATA: END OF wa_object_hd_change.
******Object ID
DATA: BEGIN OF wa_object_id.
INCLUDE STRUCTURE soodk.
DATA: END OF wa_object_id.
******Object Defintion.
DATA: BEGIN OF wa_sood.
INCLUDE STRUCTURE sood.
DATA: END OF wa_sood.
******User Definition
DATA: BEGIN OF wa_soud.
INCLUDE STRUCTURE soud.
DATA: END OF wa_soud.
******Sent to all flag.
DATA: BEGIN OF wa_sonv.
INCLUDE STRUCTURE sonv.
DATA: END OF wa_sonv.
******Mail contents
DATA: BEGIN OF wa_objcont.
INCLUDE STRUCTURE solisti1.
DATA: END OF wa_objcont.
******Mail header.
DATA: BEGIN OF wa_objhead.
INCLUDE STRUCTURE soli.
DATA: END OF wa_objhead.
******Para A
DATA: BEGIN OF wa_objpara.
INCLUDE STRUCTURE soparai1.
DATA: END OF wa_objpara.
******Para B
DATA: BEGIN OF wa_objparb.
INCLUDE STRUCTURE soparbi1.
DATA: END OF wa_objparb.
******Receivers list
DATA: BEGIN OF wa_receivers.
INCLUDE STRUCTURE somlreci1.
DATA: END OF wa_receivers.
Pack list
DATA: BEGIN OF wa_packlist.
INCLUDE STRUCTURE sopcklsti1.
DATA: END OF wa_packlist.
DATA: BEGIN OF wa_att_head.
INCLUDE STRUCTURE soli.
DATA: END OF wa_att_head.
********************internal tables******************************
DATA: lt_objcont LIKE wa_objcont OCCURS 0, "mail contents
lt_objhead LIKE wa_objhead OCCURS 0, "mail header
lt_objpara LIKE wa_objpara OCCURS 0, "Paragraph A
lt_objparb LIKE wa_objparb OCCURS 0, "Paragraph B
lt_receivers LIKE wa_receivers OCCURS 0," receiver list
lt_packlist LIKE wa_packlist OCCURS 0,"Pack list
lt_att_head LIKE wa_att_head OCCURS 0."Attachment Header
**************************Constants***********************************
CONSTANTS: lc_kreuz LIKE sonv-flag VALUE 'X', "Outbox flag,
lc_colon(1) TYPE c VALUE ':',
lc_raw(3) TYPE c VALUE 'RAW',
lc_f(1) TYPE c VALUE 'F',
lc_u(1) TYPE c VALUE 'U'.
DATA: w_cnt TYPE i.
data : wa_edition like t_edition.
DATA : i_strlen TYPE i,
i_off TYPE i ,
i_len TYPE i VALUE 254,
i_totlen TYPE i,
lv_fill_space TYPE i,
lv_split_times TYPE i,
lv_len TYPE i.
**>> Populate the attachment contents.*
LOOP AT gt_output INTO wa_output.
i_strlen = strlen( wa_output ) .
IF i_strlen LE 254.
CONCATENATE con_cret wa_output-buffer
INTO wa_output-buffer.
APPEND wa_output-buffer TO lt_att_cont.
ELSE. " i.e the data is more than 255 characters
DO 4 TIMES.
i_totlen = i_off + i_len .
IF i_totlen = 254.
wa_att_cont = wa_output+i_off(i_len).
CONCATENATE con_cret wa_att_cont
INTO wa_att_cont.
APPEND wa_att_cont TO lt_att_cont.
ELSE.
wa_att_cont = wa_output+i_off(i_len). "splitting more than 255
APPEND wa_att_cont TO lt_att_cont.
ENDIF.
IF i_totlen GE i_strlen.
CLEAR : i_off .
EXIT.
ELSE.
i_off = i_off + 254.
ENDIF.
ENDDO.
ENDIF.
CLEAR : wa_output.
ENDLOOP. -
How can i see the URL which has length more than 255 chars in fucnction
Hello Every body....
I am facing one problem....I have a function module which returns URL in one table
but in the function module display i am able to see only 255 characters,but the URL is more than 255 Characters..How can i see the URL which has the length more than 255 characters..
In the Table the fields url length is 4000 chars.....
but display it is showing only 255 chars.....
Please Help me...??????????Hello,
Have you tried breaking your structure into 255 chunks? I don't know what the structure you are moving from looks like, but you should be able break it back up into the SOLI structure. The end of a line in SOLI doesn't create a Carriage Return/Line Break. You have to insert these yourself like in the following:
* Create document
clear mail_line.
move 'This is a test E-Mail'(d01) to mail_line.
concatenate mail_line
cl_abap_char_utilities=>newline
into mail_line.
append mail_line to l_mailtext.
What kind of attachment are you wanting to create - a text tab delimited file for reading in a spreadsheet application such as excel? You might try reassembling your data table into a single string with newlines where you need them. Then use function module SCMS_STRING_TO_FTEXT to turn it back into SOLI. This is what I have done in the past. I'm afraid without knowing more about your source structure and attachment type, this is about all I can tell you.
Vasanth
Maybe you are looking for
-
How to retrieve records from a database and display it in a jsp page.Help!!
Hello everyone ! im very new to this forum.Please help me to solve my problem First i ll explain what is my requirement or needed. Actually in my web page i have text box to enter start date and end date and one list box to select the month .If user
-
Running Simple Form in 11.1.1.4
dear All any problem between 11.1.1.4 Jdeveloper and database 10g express edition ? , 11.1.1.3 was working fine.i am facing issue of ADF_FACES-60096:Server Exception during PPR i am using Business components project and JSF Interface Project and conn
-
Just to be fair.. i wanted to
That i finally got my new Zen Micro Photo in the mail, i set it up yesterday and have all 300+ of my songs and 400+ photos on it, and i'm enjoying it at my desk now. The first one gave me a hell of a lot of problems, but so far this one is great. It
-
Disappearing iptc fields - script to lift and stamp metadata
Hi there, I don't know if this is a general thing or not with Aperture 2.1, but in my library (all referenced images on 3 external disks) lots of not really recent photos get their thumbnails and previews updated anytime I browse the library. Althoug
-
My iMac will not always start after pressing the start button in the rear, sometimes I need to push 3 or 4 times for the pc to engage and start then will work fine up until next day when it may start properly or will need 3 or 4 pushes at the rear st