Number of lines of an ABAP
Hello ,
I need a hitlist of customer programms with the most numbers of lines, or programmes with more than 5.000 lines of coding.
Is there a table ?
Which table holds the coding ?
Thanks for any answer you know.
Cheers
Simone
Hello Simone
Below you find a variation of my previous report adjusted for reading function groups:
*& Report ZUS_SDN_ABAP_SOURCE_CODE_1
*& Thread: Number of lines of an ABAP
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="817091"></a>
REPORT zus_sdn_abap_source_code_1.
TYPE-POOLS: sedi, suni.
TABLES: tlibg.
TABLES: tfdir.
DATA: go_source TYPE REF TO cl_wb_source,
gs_trkey TYPE trkey,
gt_functab TYPE suni_functab,
gs_func LIKE LINE OF gt_functab,
gd_repid TYPE sy-repid,
gt_source TYPE sedi_source,
gt_linenumbers TYPE sedi_linenumbers,
gd_msg TYPE bapi_msg.
PARAMETERS:
p_fugr TYPE tlibg-area DEFAULT 'ZUS_SDN_ALV_SCREEN'.
START-OF-SELECTION.
CALL FUNCTION 'FUNCTION_INCLUDE_INFO'
IMPORTING
functab = gt_functab
* NAMESPACE =
* PNAME =
CHANGING
* FUNCNAME =
group = p_fugr
* INCLUDE =
EXCEPTIONS
function_not_exists = 1
include_not_exists = 2
group_not_exists = 3
no_selections = 4
no_function_include = 5
OTHERS = 6.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
RETURN.
ENDIF.
READ TABLE gt_functab INTO gs_func INDEX 1. " just read 1st fm
CLEAR: gs_trkey.
SELECT SINGLE * FROM appl_func INTO CORRESPONDING FIELDS OF gs_trkey
WHERE obj_name = p_fugr.
CHECK ( syst-subrc = 0 ).
** gs_trkey-devclass = 'ZUS_SDN1'.
gs_trkey-obj_type = 'FUGR'.
** gs_trkey-obj_name = p_fugr.
gs_trkey-sub_type = 'FUNC'.
gs_trkey-sub_name = gs_func-funcname.
gd_repid = gs_func-funcincl. " include of fm
CREATE OBJECT go_source
EXPORTING
transport_key = gs_trkey
* source_name = 'ZUS_SDN_ABAP_SOURCE_CODE'
* modification_mode =
* abap_editor =
* method_key =
CALL METHOD go_source->read_source
EXPORTING
* status = SPACE
* toggle_enh_status = SPACE
source_name = gd_repid
* initialize_edit_control = ' '
* load_from_temp_storage = 'X'
* load_from_temp_storage_uncond = SPACE
* with_conversion = 'X'
* mode =
* with_enhancements = 'X'
* insert_impl_enh_points = ' '
* IMPORTING
* source_tab =
* CHANGING
* mod_instance =
EXCEPTIONS
cancelled = 1
not_found = 2
read_protected = 3
enhancement_locked = 4
OTHERS = 5.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
RETURN.
ENDIF.
CALL METHOD go_source->get_source_tab
* EXPORTING
* use_attribute = space
* use_control = space
IMPORTING
SOURCE = gt_source.
** CALL METHOD go_source->get_linenumbers
** IMPORTING
** linenum = gt_linenumbers.
** DESCRIBE TABLE gt_linenumbers.
DESCRIBE TABLE gt_source.
IF ( syst-tfill > 50 ).
CONCATENATE 'FB' gs_func-funcname
'contains > 50 coding lines'
INTO gd_msg SEPARATED BY space.
MESSAGE gd_msg TYPE 'I'.
ENDIF.
END-OF-SELECTION.
Regards
Uwe
Similar Messages
-
Number of Lines limited in InfoPackage Selection?
Hello Experts!
I have 2 InfoPackage in order to load Data from ODS1 into ODS2. Selection is made for customer number - exact criteria is made via Abap Routine in InfoPackage. (InfoPackage 1 has all customers meeting a certain criteria - InfoPackage 2 has all the ranges in between the customer Numvers of InfoPackage 1).
Therefore the load of both InfoPackages should load all data - but the problem is, I only get a small part of the Data. In ODS 1 there are some 2.800.000 entries and in ODS2 the load of the 2 InfoPackages only select about 30.000 entries.
Since the selection criteria in monitoring seem fine - do you have any idea where the problem comes from? Is there a max. number of lines for selection to be made in infoPackage?
Thanks for your help!
AngelikaHi Angelika,
check out the monitor --> in the request tree check the numbers coming into the update rules an coming out of the update rules, may be you are loosing some records there. The only thing that I know about the size of selections is that you will get a dump if you have to many entries in a select-option table (and having those lines in a infopackage is nothing else).
Another reason might be a missing alpha conversion of the entries in the infopackage.
kind regards
Siggi -
Limit number of lines in a text editor
Hello.
In my program, i'm creating a text zone and i need to limit the data users will put in this zone.
To create that, i'm using the object cl_gui_textedit. I've looked in the methods of this object but i wasn't able to find one that will limit the number of lines of the text editor.
Did i miss it ? Does anybody knows how i can for example limit the input zone to 5 lines ?
Thanks for your help.
Here's my code
IF g_editor IS INITIAL.
* Instanciation du container pour la zone de texte
CREATE OBJECT g_textedit_custom_container
EXPORTING
container_name = 'TEXTEDITOR'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
IF sy-subrc NE 0.
* add your handling
ENDIF.
* Création de la zone d'édition du texte
CREATE OBJECT g_editor
EXPORTING
parent = g_textedit_custom_container
wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
wordwrap_position = 68
wordwrap_to_linebreak_mode = cl_gui_textedit=>true.
ENDIF.I just notice there is a method SET_HEIGHT but this one is implemented in CL_GUI_CONTROL.
I tried this :
CALL METHOD g_editor->set_height
EXPORTING height = w_height.
But in fact, i never enter the method.
Do i have to create a CL_GUI_CONTROL object ? If yes, how do i link it to the CL_GUI_TEXTEDIT.
Sorry if some questions mays seem obvious. It's my first object abap program. -
Finding number of lines in a program/function module
Hi Expets,
I would like to know is there any way to find the number of code lines in a ABAP program/function module.
Additionally, can i extend this to a package such that the utility will find the number of codelines in all the programs/function modules/include programs in that package.
Any hints regarding the same would be appreciated.
Regards,
Ramanath1. First using Read report to load the source code to your internal table.
2. Using SCAN statement to do analysis about the source code. pls refer to the sap keyword help about "SCAN".
Syntax Diagram
SCAN
Note
This statement is for internal use only.
It cannot be used in application programs.
Variants:
1. SCAN ABAP-SOURCE itab1 ...TOKENS INTO itab2
...STATEMENTS INTO itab3.
2. SCAN AND CHECK ABAP-SOURCE itab1 ...RESULT INTO itab2.
Variant 1
SCAN ABAP-SOURCE itab1 ...TOKENS INTO itab2
...STATEMENTS INTO itab3.
Parts marked with " ..." are interchangeable
Extras:
1. ... FROM n1
2. ... TO n2
3. ... KEYWORDS FROM itab4
4. ... LEVELS INTO itab5
5. ... STRUCTURES INTO itab6
6. ... OVERFLOW INTO c1
7. ... WITH ANALYSIS
8. ... WITH COMMENTS
9. ... WITH INCLUDES [IMPLEMENTATIONS FROM itab]
10. ... WITH TYPE-POOLS
11. ... WITH LIST TOKENIZATION
12. ... PRESERVING IDENTIFIER ESCAPING
13. ... WITHOUT TRMAC
14. ... [INCLUDE] PROGRAM FROM c2
15. ... INCLUDE INTO c3
16. ... MESSAGE INTO c4
17. ... WORD INTO c5
18. ... LINE INTO n3
19. ... OFFSET INTO n4
20. ... WITH EXPLICIT ENHANCEMENTS [IMPLEMENTATIONS FROM itab]
21. ... FRAME PROGRAM FROM c2
22. ... ENHANCEMENTS INTO itab -
Dear All,
I am facing an issue in the maximum number of line items EBP purchase order.
We are in SRM 4.0 using extended classic scenario.
In EBP PO, if the number of line items is more than 50 then we are getting the dump error "Field symbol has not yet been assigned" when we try to display the PO in Process purchase order transaction.
In process purchase order, if we click on the start after enting the PO number then it is giving the dump error. But we could able to display the PO by clicking on the details icon of the PO after searching with time frame.
Dump error is occuring only when we try open the PO header node to see the list of items of the PO. Until the PO is having 50 line items we dont have a problem. If the PO is having 51st item then we are getting the dump error.
Have anyone faced this issue? Please help me to resolve this.
Thanks.Pradeep,
Dump error details:
What happened?
Error in ABAP application program.
The current ABAP program "SAPLBBP_PDH_SEARCH" had to be terminated because one
of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Error analysis
You attempted to access an unassigned field symbol
(data segment 32774).
This error may occur for any of the following reasons:
- You address a typed field symbol before it is set using ASSIGN
- You address a field symbol that points to a line in an internal table
that has been deleted
- You address a field symbol that had previously been reset using
UNASSIGN, or that pointed to a local field that no longer exists
- You address a global function interface parameter, even
though the relevant function module is not active,
that is it is not in the list of active calls. You can get the list
of active calls from the this short dump.
Information on where terminated
The termination occurred in the ABAP program "SAPLBBP_PDH_SEARCH" in
"SUB_LIST_GET".
The main program was "SAPLBBP_PO_UI_ITS ".
The termination occurred in line 191 of the source code of the (Include)
program "LBBP_PDH_SEARCHF10"
of the source code of program "LBBP_PDH_SEARCHF10" (when calling the editor
1910).
Thanks. -
Restriction on number of line items in an automatically generated document
Hi all,
As per my info, an accounting document must have a minimum of 2 line items to complete the document. At the same time an accounting document can have a maximum of 999 line items.
My observation:-
When I am posting depreciation using t-code AFAB, system is posting depreciation document (document type AF). While checking, I found that the system has posted around 16 document for a period.
On further checking, I observed that the each document contains a max 100 line items.
I am using SAP 4.7
My Query:-
a> Is there any way / place wherein we can restrict the maximum number of line items possible for a given docuemnt type or for all document types in the client?
b> In case it is not possible to restrict the number of line items per document, what could be possible reason for the system behaviour wherein it is posting about 100 line items per document & thereafter starts a new document.
Thanking you in advance
Santosh K AgarwalHi,
I have been reading CIN. There I came across with a statement i.e. "There is restriction on no of line items to be in an Excise Invoice".
where you read this i dont know
but yes for outgoing excise invoice we can put limitation in sap cin
as per incoming excise invoice i think no limitation
in path SPRO-tax on goods movemnet-India-basic setting-maintain excise registration here you can maintain this
and yes this for india only for other country they may have different
Regards
Kailas ugale -
ALV_GRID How to get number of lines after filted applyed?
Hi, all!
The task is to display title in alv_grid like
"N records selected (X records on the screen)".
It means, N records in dataset and X records displayed after filter applyed by user.
But i can't get number of lines after filter applyed from the alv_grid.
Can anybody help me?
Thanks & regards,
KonstantinHi,
If it goes through PBO/PAI cycle after user sets the filter then in your PBO call method get_filtered_entries of CL_GUI_ALV_GRID and then do a describe statement on the table.
Number of entries in your grid table - number of entries in this filtered entries table will give you the displayed entries after the filter is set.
If it does not go through PBO/PAI cycle then register for after_user_command and I think the fcode for filter is '&FILTER' and code for the above logic in your handler method..
Hope this helps..
Sri -
Number of line items in each Invoice
Hi Gurus,
I have one requirement
i need to display one column in the Report i.e. "Line items per eachinvoice" which should give the number of line items per that Invoice
when iam using tcode 'FB03' at ECC - Document Display it is giving
for Doc 1111 - 2 line items
for Doc 2222 - 12 line items
so in the report that column should display
2 for Doc 1111
12 for Doc 2222
please guide me how to do this
Thank youcreate a formula with constant 1
and set the exception aggregation as Total, and set the reference char as Line Item.
Make sure you have Invocie in the report.
- Danny -
How to restict number of lines from my report output
Hi,
I deveoped a noraml alv report where 26 fields displayed in the report output .But when nuber of lines exdeed 65,000 then we are unable to donload it to spread sheet .so we want to reduce the number of lines based on customer .How to do this in layout is there any facility to restict the number of lines ??
Please help meHi I am not sure but you can try like devide table entries in multiple internal tables.
Create saperate ALV Report and give customized button(Next and Back) to each report will have interlink to this reports. -
How to find number of lines in the text content?
Hello All,
I have a multi line text item. I want to know the number of lines in a text item? How can I do that?
Note that every lines end with the shift+enter.
Example,
This is a
sample.
After line This is a there is (Shift + Enter).
Thanks for any help.Whenever the user inputs Shift-Enter, Photoshop inserts an [EOT] (End Of Text) control character (\x03 or \u0003) in the string.
Also, in order to split the text according to multiple separators in only one call, it is necessary to use a regular expression instead of a string.
Try replacing:
var theArray = theText.split("\r");
with:
var theArray = theText.split(/[\u0003\r]/);
BTW, you can improve performance by explicitely requesting the textKey property of the current layer object.
Try using:
ref.putProperty( charIDToTypeID("Prpr"), stringIDToTypeID("textKey") );
ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
instead of:
ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
HTH... -
How to count number of lines in a file?
I am using a BufferedReader to read my file, but I like to know how to count the number of lines in a file is there a way to do that in Buffered Reader or do I have to use FileInputLineStream?
Well, if you know how to read one line with a Buffered reader, and you know how to keep reading lines until you run out, then all you have to to is initialize a counter to zero before you start reading, add 1 to it each time you read a line, and then examine its value when you're done.
Try that, and post again if you get stuck.
Just be careful how you construct your loop. "Off by one" errors are a common way to get bitten. It could happen if you count what you think is the last line, but you've actually already counted all the lines and you end up counting one extra for "there are no more lines". -
How can I find out the number of lines in a text file?
How can I find out the number of lines in a text file?
java.io.BufferedReader in = new java.io.BufferedReader( new java.io.FileReader( "YourFile.txt" ) );
int lineCount = 0;
while( in.readLine() != null )
lineCount ++;
System.out.println( "Line Count = " + lineCount ); -
How do you find the number of lines in a file?
I need to count how many lines there are in a file, I am using a BufferedReader to read in the data, but how can I find the number of lines?
ThanksThat depends. How do you define a line? Is it a specific number of
characters, a String that's terminated by a newline character or some
combination thereof? -
How do I increase the number of lines presented in a drop down list?
When I am entering a single character/number for each of a random selection of three letters in a password verification, I get a drop down list from A to S only, the first 20. Accessing letter T to number 9 means scrolling down. How can I increase the number of lines in a drop down box to 36?
Hi canddski,
If you are taking about an interface on a website, this is up to the ui designer. But there is a reflow that depends on screensize for the Firefox UI.
You can use asp to control the list:
[http://forums.asp.net/t/1970301.aspx?How+can+i+display+selected+no+of+records+from+datatable+using+dropdown+list+without+database+]
but also try asking on stackoverflow.com -
How to get the number of lines of a FileReader
I need to calculate the number of lines of a FileReader object. How can I do that ?
I wrote the following some while ago. It assumes that a line is terminated by '\n' but it should be easy to adapt.
import java.io.*;
public class LineCounter
public static int countLines(File file, String encoding) throws IOException
int lineCount = 0;
Reader reader = new InputStreamReader(new FileInputStream(file), encoding);
char[] buffer = new char[4096];
for (int charsRead = 0; (charsRead = reader.read(buffer)) >= 0;)
for (int charIndex = 0; charIndex < charsRead ; charIndex++)
if (buffer[charIndex] == '\n')
lineCount++;
reader.close();
return lineCount;
public static void main(String[] args)
try
File file = new File("/home/sabre/work/dev/maps/EUROPE.RIV");
long startTime = System.currentTimeMillis();
int lineCount = countLines(file, "UTF-8");
double time = (System.currentTimeMillis() - startTime) / 1000.0;
System.out.println("File size = " + file.length() + " contains " + lineCount + " lines taking " + time);
catch (Exception e)
e.printStackTrace();
}
Maybe you are looking for
-
Iphone 4 won't turn on and white LED is lit up
My mom just gave me her old iPhone 4 but its screwed up. I can't tell if its on or off because the screen won't come on and it won't turn on. The white led on the back is constantly lit up. I tried holding the home and lock button but that did nothin
-
Hi, I am new to Oracle Service Bus 11g. Could you please explain how the for each action in osb can be used. I have xml which is received from another service. I want to loop for each item and send this userId to particular callout. <execute service=
-
Transparent edges in psd exported from Illustrator
Hello Community, I have something going on when I export from Illustrator as a PSD using the artboard. It ends up with a line of transparency around the edges, and is larger than the size of the art exported. It gains about .01 inch around the edges,
-
Where can i find touch pad drivers for Satellite A300?
Where I can find Touchpad Drivers for Toshiba A300? Help, please.
-
How do I get adobeacrbat to install?
how do I get adobe acrobat to install?