Message: The ABAP program lines are wider than the internal table.
sorry for stupid question.... can you please tell me what I need to check?
The internal table "\FUNCTION=K_KKB_FIELDCAT_MERGE\DATA=L_ABAP_SOURCE[]" is 72
characters wide. The program line is
75 characters wide.
Uf, I can't find the mistake
BR
Hi,
please try to change some settings and see ...
SE38->program->Display->Utilities->Settings->Abapeditor->editor, check the last check box (downwards-Comp Line Length)...
If you are using merge fundtion module try to delcare the final internal table like this
data : BEGIN OF i_final OCCURS 0,
matnr LIKE mara-matnr, "Material Number
maktx LIKE makt-maktx, "Material Description
END OF i_final.
Regards,
Nagaraj
Similar Messages
-
The ABAP program lines are wider than the internal table.
Hello;
i use FM REUSE_ALV_FIELDCATALOG_MERGE to fill in fieldcat from an internal table but i receive dump message READ_REPORT_LINE_TOO_LONG. Is there smt. like a type mismatch or waht can that be?
detail explanation of the dump is
The internal table "\FUNCTION=K_KKB_FIELDCAT_MERGE\DATA=L_ABAP_SOURCE[]" is 72 characters wide. The program line is
81 characters wide.
source of the call is like:
DATA: ALV_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
ALV_HEADER TYPE SLIS_T_LISTHEADER WITH HEADER LINE,
ALV_EVENTS TYPE SLIS_T_EVENT WITH HEADER LINE,
ALV_LAYOUT TYPE SLIS_LAYOUT_ALV,
ALV_PRINT TYPE SLIS_PRINT_ALV,
ALV_REPID LIKE SY-REPID, " program name
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = alv_repid
I_INTERNAL_TABNAME = 'ITAB'
I_INCLNAME = alv_repid
CHANGING
CT_FIELDCAT = alv_fieldcat[]
EXCEPTIONS
OTHERS = 3.
thx in advance
AliHi,
At least one line of the source text is longer than the lines of the internal table itab then,
READ_REPORT_LINE_TOO_LONG. error occurs.
Cause: At least one line of the source text is longer than the lines of the internal table itab.
Runtime Error: READ_REPORT_LINE_TOO_LONG
check the link below for further info
http://www.s001.org/ABAP-Hlp/abapread_report.htm
one more thing, whether u have given report name
ALV_REPID = 'ZXYZ'.
if ZXYZ is u r program name -
Runtime error:ABAP program lines are longer than the internal table
Hi all,
Below is the code I have written,when Iam running it Iam getting
'ABAP program lines are longer than the internal table' runtime error.How can I resolve it.
REPORT ZTEST1 NO STANDARD PAGE HEADING LINE-SIZE 255.
TABLES:MARC,CDHDR,CDPOS.
TYPE-POOLS:SLIS.
DATA:HEADER TYPE SLIS_T_FIELDCAT_ALV,
WA TYPE SLIS_FIELDCAT_ALV,
LAYOUT TYPE SLIS_LAYOUT_ALV.
TYPES:BEGIN OF MARC_TY,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS,
EKGRP LIKE MARC-EKGRP,
MINBE LIKE MARC-MINBE,
EISBE LIKE MARC-EISBE,
MABST LIKE MARC-MABST,
END OF MARC_TY.
TYPES:BEGIN OF MATNR1_TY,
MATNR1 LIKE CDHDR-OBJECTID,
END OF MATNR1_TY.
TYPES:BEGIN OF CDHDR_TY,
OBJECTCLAS LIKE CDHDR-OBJECTCLAS,
OBJECTID LIKE CDHDR-OBJECTID,
CHANGENR LIKE CDHDR-CHANGENR,
USERNAME LIKE CDHDR-USERNAME,
UDATE LIKE CDHDR-UDATE,
END OF CDHDR_TY.
TYPES:BEGIN OF CDPOS_TY,
OBJECTCLAS LIKE CDPOS-OBJECTCLAS,
OBJECTID LIKE CDPOS-OBJECTID,
CHANGENR LIKE CDPOS-CHANGENR,
TABNAME LIKE CDPOS-TABNAME,
FNAME LIKE CDPOS-FNAME,
CHNGIND LIKE CDPOS-CHNGIND,
VALUE_NEW LIKE CDPOS-VALUE_NEW,
VALUE_OLD LIKE CDPOS-VALUE_OLD,
END OF CDPOS_TY.
**************TABLE TYPES********************************************
TYPES: MARC_TAB TYPE TABLE OF MARC_TY,
MATNR1_TAB TYPE TABLE OF MATNR1_TY,
CDHDR_TAB TYPE TABLE OF CDHDR_TY,
CDPOS_TAB TYPE TABLE OF CDPOS_TY.
*******************INTERNAL TABLES************************************
DATA:MARC_ITAB TYPE MARC_TAB,
MATNR1_ITAB TYPE MATNR1_TAB,
CDHDR_ITAB TYPE CDHDR_TAB,
CDPOS_ITAB TYPE CDPOS_TAB.
****************WORK AREAS********************************************
DATA:MARC_WA TYPE MARC_TY,
MATNR1_WA TYPE MATNR1_TY,
CDHDR_WA TYPE CDHDR_TY,
CDPOS_WA TYPE CDPOS_TY.
*******************SELECTION-SCREEN***********************************
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
PARAMETERS:PLANT LIKE MARC-WERKS.
SELECT-OPTIONS:MATERIAL FOR MARC-MATNR.
SELECT-OPTIONS:DATE FOR CDHDR-UDATE.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
SELECT MATNR
WERKS
EKGRP
MINBE
EISBE
MABST
FROM MARC INTO TABLE MARC_ITAB
WHERE MATNR IN MATERIAL
AND WERKS = PLANT.
CHECK MARC_ITAB[] IS NOT INITIAL.
LOOP AT MARC_ITAB INTO MARC_WA.
MATNR1_WA-MATNR1 = MARC_WA-MATNR.
APPEND MATNR1_WA TO MATNR1_ITAB.
CLEAR MATNR1_WA.
ENDLOOP.
CHECK MATNR1_ITAB[] IS NOT INITIAL.
SELECT OBJECTCLAS
OBJECTID
CHANGENR
USERNAME
UDATE
FROM CDHDR INTO TABLE CDHDR_ITAB
FOR ALL ENTRIES IN MATNR1_ITAB
WHERE OBJECTCLAS = 'MATERIAL'
AND OBJECTID = MATNR1_ITAB-MATNR1
AND UDATE IN DATE.
CHECK CDHDR_ITAB[] IS NOT INITIAL.
SORT CDHDR_ITAB[] DESCENDING BY OBJECTID CHANGENR.
DELETE ADJACENT DUPLICATES FROM CDHDR_ITAB[] COMPARING OBJECTID.
SELECT OBJECTCLAS
OBJECTID
CHANGENR
TABNAME
FNAME
CHNGIND
VALUE_NEW
VALUE_OLD
FROM CDPOS INTO CORRESPONDING FIELDS OF TABLE CDPOS_ITAB
FOR ALL ENTRIES IN CDHDR_ITAB
WHERE OBJECTCLAS = CDHDR_ITAB-OBJECTCLAS
AND OBJECTID = CDHDR_ITAB-OBJECTID
AND CHANGENR = CDHDR_ITAB-CHANGENR
AND TABNAME = 'MARC'
AND FNAME IN ('MINBE','EISBE','MABST','LVORM')
AND CHNGIND = 'U'.
CHECK CDPOS_ITAB[] IS NOT INITIAL.
*LOOP AT CDPOS_ITAB INTO CDPOS_WA.
WRITE: / CDPOS_WA-OBJECTCLAS,
CDPOS_WA-OBJECTID,
CDPOS_WA-CHANGENR,
CDPOS_WA-TABNAME,
CDPOS_WA-FNAME,
CDPOS_WA-CHNGIND,
CDPOS_WA-VALUE_NEW,
CDPOS_WA-VALUE_OLD.
*ENDLOOP.
WA-SELTEXT_L = 'OBJECTCLAS'.
WA-COL_POS = '1'.
WA-FIELDNAME = 'OBJECTCLAS'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '15'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'OBJECTID'.
WA-COL_POS = '2'.
WA-FIELDNAME = 'OBJECTID'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '20'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'CHANGENR'.
WA-COL_POS = '3'.
WA-FIELDNAME = 'CHANGENR'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '8'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'TABNAME'.
WA-COL_POS = '4'.
WA-FIELDNAME = 'TABNAME'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '5'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'FNAME'.
WA-COL_POS = '5'.
WA-FIELDNAME = 'FNAME'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '7'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'CHANGING'.
WA-COL_POS = '6'.
WA-FIELDNAME = 'CHANGING'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '1'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'VALUE_NEW'.
WA-COL_POS = '7'.
WA-FIELDNAME = 'VALUE_NEW'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '5'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'VALUE_OLD'.
WA-COL_POS = '8'.
WA-FIELDNAME = 'VALUE_OLD'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '5'.
APPEND WA TO HEADER.
CLEAR WA.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'CDPOS_ITAB'
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = HEADER[]
EXCEPTIONS
IF SY-SUBRC <> 0.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IT_FIELDCAT = HEADER[]
TABLES
T_OUTTAB = CDPOS_ITAB[]
IF SY-SUBRC <> 0.
ENDIF.Your select querry on MARC is not matching with MARC_TY.
The field in the MARC table and MARC_TY should be same.
and also, when you are making select querry on CDPOS table
with all entries.
When ever you are using all entries select statement, you should check whether the internal table is having value.
you should check
if CDPOS_IT[] is not initial.
SELECT OBJECTCLAS
OBJECTID
CHANGENR
TABNAME
FNAME
CHNGIND
VALUE_NEW
VALUE_OLD
FROM CDPOS INTO CORRESPONDING FIELDS OF TABLE CDPOS_ITAB
FOR ALL ENTRIES IN CDHDR_ITAB
WHERE OBJECTCLAS = CDHDR_ITAB-OBJECTCLAS
AND OBJECTID = CDHDR_ITAB-OBJECTID
AND CHANGENR = CDHDR_ITAB-CHANGENR
AND TABNAME = 'MARC'
AND FNAME IN ('MINBE','EISBE','MABST','LVORM')
AND CHNGIND = 'U'.
endif.
Regards
Madhan D -
Error messages in ABAP program are stored in which table
hi all,
Can anyone tell
error messages in ABAP program are stored in which table??Hi Sir ,
Please have a look below .Hope it is suitable and simpler solution for your question.
Please do reward if useful.
Thankx.
Fuction module for storing error messages ->'format_message'
for example...
data : v_message(100) type c.
call transaction NNNN mode A update S messages into it_messages.
loop at it_messages where msgty = 'E'.
call function 'format_message'
exporting
*it_messages details
importing
v_message.
write :/ v_message.
clear v_message.
endloop.
Anothe method - ->
Here is a sample of the program code for that:
LOOP AT it_messtab.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = it_messtab-msgid
lang = it_messtab-msgspra
no = it_messtab-msgnr
v1 = it_messtab-msgv1
v2 = it_messtab-msgv2
IMPORTING
msg = g_msg
EXCEPTIONS
OTHERS = 0.
IF it_messtab-msgtyp = 'S'.
it_sucess-sucess_rec = g_msg.
it_sucess-lifnr = it_header-lifnr." Based on your field
it_sucess-tabix = v_lines.
APPEND it_sucess.
ELSEIF it_messtab-msgtyp = 'E'.
it_error-error_rec = g_msg.
it_error-lifnr = it_header-lifnr.
it_error-tabix = v_lines.
APPEND it_error.
ELSE.
it_info-info_rec = g_msg.
it_info-lifnr = it_header-lifnr.
it_info-tabix = v_lines.
APPEND it_info.
ENDIF.
ENDLOOP. -
It is possible to write abap programming lines in text element
Hi experts,
Can we write abap programming lines(loop command etc....) in text element in smart forms.
Thanks in adavnce,
Nag.
Moderator message: please search for available information/documentation.
Edited by: Thomas Zloch on May 17, 2011 11:44 AMThe lines on the DIO port respond to trhe MOMO (Must On, Must Off) protocol which is a tri state protocol. This allows each line on the DIO ports to be used individually. The lines, however, are by default static DIO which means that if you want to create a pulse train in them you must do it through a software routine where you change the states every time the set dio port momo call is executed. Another option is to use the PWM ouptut lines available on this port. You can use the lines specified as PWM outputs (check the 7344 hardware manual for this) so that in MAX you can generate a continous pulse train and then you can use NI-Motion's PWM fucntions to control the frequency and duty cycle of the train.
-
Status Message for ABAP Program
Hello Gurus,
I have an internal table. I placed the contents of the internal table on the application server using executable program. Everything works fine.
When I execute the program, the selection screen appears and after I give the inputs and execute again, the file is placed on the application screen and the screen is back to the abap code from selection screen.
I want a status message at the bottom indicating that the file was placed in the application server successfully. If it fails then I need the failure message that the file was not placed.
Please help me out how I can get these messages when I execute my program and where I need to place this code in my program.
Regards,
BaluHi,
You would be using OPEN DATASET, to transfer the internal table contents to Application Server file.So check sy-subrc.
OPEN DATASET.....
<b>IF sy-subrc eq 0.</b>
loop at itab.
transfer itab....
endloop.
Close Dataset.
Message 'File successfully saved!'.
<b>else.</b>
Message 'Error in saving the file !'.
<b>endif.</b>
Best regards,
Prashant -
Creating MS- Access data base from the Internal tables data of an ABAP Prog
Hi,
I have a requirement where I have to create Access tables from the Internal tables of ABAP program.
The tables are like Project systems Header data, WBS elements data, Netwrok data, Activity data, Milestone data and Project revunes. I will have the internal tables for these. I want to transfer these tables data into MS-Access tables onto Users desktop.
Please adivce me how to do this.
Thanks,
PrabhakarHI,
I am trying to create a DB table in the access but I am not successful. The following is the format of the table needs to be created from the ABAP program.
I have created a table with the following format in MS-Access with the name tblHeader. Is it neccessary to create a DB table ( MS-Access) in advance or by using the FM STRUCTURE_EXPORT_ TO_MSACCESS we need to create a structure in MS-Access?
False tblHeader
Field Name Type Length
ProjectDef Text 255
ProjectDes Text 255
Created Text 50
Change Text 50
RespPerson Text 255
Profile Text 255
Plant Text 255
ObjNo Text 255
OverheadKey Text 255
I have created a Z table ZTAB1 with the same format from the SAP fields.
MS-Access Table name : tblHeader
ABAP program Internal table : t_tblheader
Z table Name : ZTAB1.
First I am trying to create a structure in MS-Access with the following FM.
CALL FUNCTION 'STRUCTURE_EXPORT_ TO_MSACCESS'
EXPORTING
dbname = 'D:\test\db2'
LANGU = SY-LANGU
dest = 'PS_ACCESS_1'
TABLES
tabname = ttblheader
EXCEPTIONS
system_failure = 1
comm_failure = 2
OTHERS = 3
Table ttblheader type is DFIES and I am filling the table with only one record and one field i.e TABNAME and the value is ZTAB1.
The source code of the FM is using another FM
CALL FUNCTION 'MSACCESS_STRUCT_ EXPORT_RFC' DESTINATION DEST
Here I am getting the Error message Object required. I can't able to create a table structure in MS-Access.
Next I am going to Use the FM
'TABLE_EXPORT_ TO_MSACCESS'
and it will create the records in the MS-access table.
CALL FUNCTION 'TABLE_EXPORT_ TO_MSACCESS'
EXPORTING
dbname = 'D:\test\db2'
langu = sy-langu
dest = 'PS_ACCESS_2'
tabname = 'ZTAB1'
reftable = 'tblheader'
FLG_NO_DOWNLOAD = ' '
FLG_APPEND = ' '
FLG_POPUP = ' '
TABLES
dtab = t_tblheader
here t_tblheader is the internal table.
Reftable = tblheader is the table which i have created in advance. ( not by using the First FM)
In this FM i am getting a error message : Unable to connect to Database D:\test\db2.
Please help me how to create the MS-Access database. -
Automatic Payment program -line item cleared not displaying in table
automatic Payment program -line item cleared not displaying in table
i have re run the APP program DUSR1 same earlier it has run twice but table dose not show double payment to vendors how to resolve the issue.
Can some one please guide me on this.Hi Priyanka,
First, which table are you referring to. If your fist APP run clears the line item, it will no longer be available in the open item.
Please be more specific on the problem so that we can try to help you. If possible, please provide screenshots.
Regards,
Ganesh -
How to pass the internal table defined in program to ALV
Hi Friends,
I have a doubt regaring the ALV's,
How can we pass the internal table defined in the program to ALV by not filling the attribute (I_STRUCTURE_NAME) in the REUSE_ALV_LIST_DISPLAY.
I have tried many ways but unable to pass the structure of the internal table. I am getting the error message "Field Catalog Not Specified......" and its terminating and when i am giving the I_STRUCTURE_NAME = 'INTERNAL-TABLE-NAME' then its displaying a blank screen with all the tool-bars and icons...(No output of internal table data is seen on the screen) .
and when i am passing the DDIC table or structure ( for eg. LFA1) to I_STRUCTURE_NAME then its displaying with any error.
Plaese help in resolving this problem....
Regards
Pradeep GoliHi,
Check this thread which gives example of ALV. This will give you an idea.
Interactive ALV
ashish -
*How can we use the internal table in module pool programming? Clarify plz*
If we creating a screen using the table having four fields(for e.g.). The screen has the functions of display, modify, delete, save, exit etc for the fields. The front-end of the screen having I/O fields of the table using internal table. How can we declare the internal table in the screen?
HI,
Create one WA for your Internal table and then map it to your fields.
For Example,
Data : begin of wa,
name(10),
age type i,
end of wa.
data : it like table of wa with header line.
Then in screen create input fields with the name, age and ***.
Then the user entered values are stored in name age and ***.
then you can manipulate with that values using wa.
Thanks. -
Value not moved to work are of the internal table
HI
I have one internal table declared with occurs 2500.
i am selecting the values from a z table into this internal table.
now i want to move the values in the table to another internal table for download.here except one field all the other fields are moving to the new internal table.When i debugged i could see the value in the internal table but its not getting moved to work area of that internal table (or the header line).
I could not see the value when i use itab[]-field in debugger mode instead when i use itab[1]-field i could see that field value.
please do suggest.There is no need to move your data from one internal table to another with fixed structure. All you need to do is take each row's components skipping the column you don't want to download and concatenate this to some string. Then append to string table and download it. Sample:
"let's say your column is on 3rd place in the table
data l_row_string type string.
data lt_string_tab type table of string.
Loop at itab assigning <wa>.
do.
check sy-index ne 3. "skip this column
assign component sy-index of structure <wa> to <comp>.
if sy-subrc = 0.
CONCATENATE l_row_string <comp> INTO l_row_string SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
else.
"no more component in row
append l_row_string to lt_string_tab.
clear l_row_string.
exit.
endif.
enddo.
endloop.
Now all you need is to downlaod your lt_string_tab as your text file (extension TXT).
Regards
Marcin -
To delete the last line of the internal table
How to delete the last line of the internal table.???????
The list which gets displayed from the internal table adds a dummy line at the last which shows zeros and zeros.all the otheer selections are perfect.i just want to delete the last line which comes as zero zero.is there any way to do it...Quite Easy......Use Describe command to Count the Total Number of Table Lines, and then Delete the Last Line using Index.
Data L like sy-tabix.
Describe Table Itab Lines L.
Delete itab index L. -
What is the maximal line length of type any internal table
Dear all,
who can tell me what is the maximal line length of type any internal table.
Thanks!There is no limit to the record length of an internal table.
There is overall memory limit for every program (as setup by your basis). So, depending on the width of the ITAB, the number of records in ITAB is limited by the assigned memory. -
Declaring the internal table in ABAP objects
Hi every1,
Please any one let me know how to declare an internal table in class (ABAP objects). Bcos i am new to this classes.
help me out.
Regards,
MadhaviHi,
Check this example..
TYPES: BEGIN OF TYPE_DATA,
MATNR TYPE MATNR,
WERKS TYPE WERKS_D,
END OF TYPE_DATA.
DATA: T_DATA TYPE STANDARD TABLE OF TYPE_DATA.
DATA: WA_DATA TYPE TYPE_DATA.
Adding rows to the internal table.
WA_DATA-MATNR = 'AA'.
APPEND WA_DATA TO T_DATA.
Processing the interna table
LOOP AT T_DATA INTO WA_DATA.
ENDLOOP.
Thanks,
Naren -
Problem in changing the internal table contents of a standard program
Dear All,
I am making changes to internal table LT_PPDIT of standard program SAPLHRPT in the user exit EXIT_SAPLACC4_001 while payroll posting to accounting with tcode PC00_M99_CIPE. But though the changed value of LT_PPDIT is visible within the exit still the value of LT_PPDIT when we come outside exit is the same as what was before entering exit.
Please suggest is there any way of modifying internal table of a standard program in the user exit.
Regards,
KanupriyaHi,
I think the internal table is getting refreshed or something like that after the user exit.
Try debugging after the user exit and put breakpoints at clear and modify statements.
Then you ll find out where its regaining the oringinal value after getting changes.
After locating that point try finding some enhancmenent point there and including your code so that your value of internal able gets modified.
Regards,
Subhashini
Maybe you are looking for
-
How do I remove an itunes account from an i5
I am in charge of setting up my companies phone. I have connected several i devices to my computer and have ended up with several itunes profiles on my computer. I recently transferred some files to a new i5 for someone. I was never prompted to se
-
Unable to open new itunes album digital booklet
I just downloaded a new album in itunes that came with a digital booklet, but I can't open it on my mac pro in either Adobe or Preview, from itunes or from explorer. Doing so prompts an error msg saying the pdf is not a supported file type or has bee
-
Number of Application in 1 Appset in Sap BOPC 7.5 MS version
Hi guru, i'm working with sap bopc 7.5 ms does anyone knows how many Applications we can create in 1 Appset? Is there a limit? thanks in advance A
-
Creating an offline playlist for flash videos
Hi I have several flash videos that I want to create a play list for, can I do this? The videos are located on a PC HD. I have 3 files, Player.exe, video.flv and text.txt Cheers Eugene
-
Hi I have install primavera P6 in my system,it is client PV application. Before that i have created PMDB and MMDB databse in MS SQL 2005. Project management module has been install successfully but methodology management module is not install. Databa