How to know the internal table's last record
Dear friends,
Just I want to know my internal table last records, Ex:
I am having the records in my internal table like this:
Itab-col1
1
2
3
4
5
6
7
8
9
I want to know and print the last record, it maybe n number of records in my itab.
If I used at last within a loop but it dosn't work its taking the all *** in header.
How to know which is the last record in my internal table.
Thanks,
Sridhar.
hi,
sridher reddy
1st describe ur table i.e read the number of entries in the table .....
data : count type i.
DESCRIBE TABLE <table name > LINES count.
READ TABLE <table name > INDEX count.
write : <table name>-<fieldname>.......... .
by this way u can print the last record of your table
Similar Messages
-
How to Read the internal table for the data download from the spool
HI all,
I have one issue regarding the spool ,we are getting the correct output as per requirement of user but when we send the same to the user in pdf format they did notget the same.
they are telling that the due date is missing from the pdf.
Please advice me how to track the internal table for the spool data converted intopdf in a readable format.
the FM used for the above task is :
call function 'CONVERT_OTFSPOOLJOB_2_PDF'
Please reply if any one worked on the same.
Thanks in advance.
Gaurav,Hi Wang,
Please let me know how you solved your question.
Points will be rewarded.
Thanks,
Arun. -
How to import the internal table into subroutine as parameter
how to import the internal table into subroutine as parameter, and its structure can be recognized inside the subroutine
Hi Yong,
try this:
parameters: p_tabnm like dd03l-tabname.
field-symbols: <fs_tabname> type standard table.
data: itab_ref type ref to data.
create data itab_ref type standard table of (p_tabnm)
with default key.
assign itab_ref->* to <fs_tabname>.
select * from (p_tabnm) into table <fs_tabname>.
perform subroutine tables <fs_tabname>
using p_tabnm.
*& Form subroutine
text
-->P_<FS_TABNAME> text
-->P_P_TABNM text
form subroutine tables p_tabname type standard table
using p_tabnm.
Here p_tabname already has the structure of the table you gave as input
parameter
endform. " subroutine -
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 to pass the internal table data to smartforms
Hi Gurus,
I have a problem in passing the internal table data to the smartforms. In the print program
I get the data into one internal table "LT_PRDLBL1". I am passing this internal table to the other in print program by calling the FM_NAME.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = T_SSFCTRLOP
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = T_SSFCOMPOP
USER_SETTINGS = ' '
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
LT_PRDLBL = LT_PRDLBL1
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
In the print program I had defined the internal tables like
Data: lt_prdlbl type standard table of zprdlbl.
Data: Begin of lt_prdlbl1 occurs 0.
include structure zprdlbl.
Data: End of lt_prdlbl1.
How do I define the internal table in the smartform to get the values printed in the smartform?.
<REMOVED BY MODERATOR>
Thanks,
Edited by: Alvaro Tejada Galindo on Apr 21, 2008 1:01 PMNehal,
Thanks for quick response.
In the smartform under the Form Interface->Tables tab
I had defined
LT_PRDLBL LIKE ZPRDLBL. If I define TYPE instead of LIKE I get the error message saying "FLAT TYPES may only be referenced using LIKE for table parameters".
In the main window I have created LOOP, in which I have ticked the internal table and
LT_PRDLBL INTO LT_PRDLBL. In the text node I am passing the values of this internal table
<_PRDLBL-XXXX&.
I am able to get the print but the data is not printing.
Please help me with this.
Thanks, -
How to Pass the internal table data?
DearAll,
How to pass the Data of one internal table on a 1.html page to another html page for output, in BSP Application.
regards.Hi ,
In the onInputProcessing event of the first page , write the following code...
call method NAVIGATION->SET_PARAMETER exporting
name = 'it_filt_cur'
value = it_filt_cur.
Here it_filt_cur is internal table.
NAVIGATION->GOTO_PAGE('next.htm').
In the next page , you can make the internal table as auto in the attributes.
Since you have made the itab as auto transfer , you can directly access the itab in the initialization event of the next page if it is stateless.
Regards,
Laxman Nayak.
Message was edited by: Laxman Nayak -
How to Pass the Internal table of a report to Smart Form
Hi Experts,
I have one report in which from selection screen i am getting the values from the users, and upon that values i am filling data in to the internal table.
Now i want to pass that internal table data to the smart form
and print that data in the smart form.
So could you pls give me some pseudo code or any steps to achieve it.
Thanks & Regards,
DSHi DS,
First of all you need to create a SF and then need to call the FM generated by the FM in your report.
In the SF in the form interface>tables tab>mention the name of the table and its type structure.
Pls note that a new structure has to be created as the same type of your internal table which holds the data.
And the import and export parameters as just the same as in a FM.
Now after you create and activate your SF a FM will be generated (wen u execute your SF you will be taken to this SE37 screen with the name of FM so no probs..)
You can call this FM in your report. Hope this helps.
Ex:
say itab has your final data, and you also want to export a variable var1 to the SF.
after your normal report operations end, call the FM and pass on these data.
say your FM name is FM1.
call function FM1
exporting
var1 = var1
tables
itab1 = itab1.
pls note that in the SF also i gave the same names, it is not mandatory to give the same names.
and as you want to print a table in the smartforms, you need to create a table in the smart forms and then display the data which is quite simple.
Hope this helps...
if you need any further explanations, pls revert...
Regards,
Narendra.
Reward points if helpful!!! -
How to know the corresponding Table-fields in R/3 for fields in BW
Hi,
We need to enhance the extractor for 0CUSTOMER_ATTR. We have added some new attributes in 0CUSTOMER in BW and we want to know the corresponding Table-Fields in R/3 from where we can populate the values.
The list of fields in BW is as follws. All are 0CUSTOMER attributes.
I am searching on the internet. If you know any link/place where I can find the corresponding fields, please let me know.
0AF_CUSTDC
0AF_CUSTID
0CITY_2
0DB87SIC1
0DBANSALES
0DBAREACOD
0DBCTRYCOD
0DBCTYNAM
0DBCUSTAT
0DBDISTRCOD
0DBEMPBND
0DBEMPTOT
0DBGUDUNS
0DBHQDUNS
0DBBLGLSTAT
0DBLOCACOD
0DBREGCOD
0DBSALBND
0DBSECTCOD
0DBYRSBND
0DBYRSTD
0DB_MAKTCOD
0DB_MATCDS
0FAX_NUM
0ID_TXNUMB3
0ID_XCPD
0LANGU
0POBOX_LOC
0SORTL
0TAX_NUMB2
0DBTRDSTYL
0DBADDRES1
0DBADDRES2
0DBCTRYNA
0DBSTPRCOD
0DBPOSTCOD
0DBNATID
0DBNATIDCO
0DBTELPHON
0DBCEONAME
0DBLNOFBUS
0DBANSLUS
0DBCURNCCO
0DBEMPHERE
0DBSUBCODE
0DBHQNAME
0DBHQCTYNM
0DBHQSTPR
0DBHQCTRYN
0DBULDUNS
0DBULNAME
0DBULCTYNM
0DBGUCTRYN
0DBGUCTRYC
0DBGUNAME
0DBNUMFAM
0DBHIERCO
0DBFAMUPDT
0DBBUSNAME
0DB_MATCH
Thanks,
Naveen ChoudharyNaveen,
Check http://help.sap.com/search/highlightContent.jsp
Also see Re: 0customer_attr enhancement
If the source fields in R/3 are standard, you should be able to find the mapping in the help documentation. If its extension field, then you got to see which extractor (based on the base table extension) suits the best and extend it accordingly else create a new generic extractor.
Hope it helps -
How to structure the internal table issue I want to download to excel
Hi ,
I am trying to download the data from the internal table whose structure was
i HAVE ONE INTERNAL TABLE WHICH IS
123 ABC MIKE
123 ABC DALLAS
123 ABC BOMBAY
345 BCD MEENAL
345 BCD SHINDE
345 BCD UJWALA
I want the output the i WANT THE INTERNAL TABLE TO STRUCTURE IN THIS WAY
123 ABC MIKE
DALLAS
BOMBAY
345 BCD MEENAL
SHINDE
UJWALAU have to fill internal table as ..
Loop at ITAB. <-- contains all the values
at new field2.
itab1 = itab.
append itab1.
clear itab1.
continue.
endat.
clear : itab-field1 , itab-field2.
itab1 = itab.
append itab1.
clear itab1.
endloop.
Now download ITAB1. -
How to print the internal tables in grid format
i have an internal table with 3 fields
ITAB1
1 a
2 b
3 c
I want to print this in the gird like
1 2 3
a b c
Can any one help me how to do it
Thank youDATA: BEGIN OF S_STRUC,
KEY1,
KEY2,
KEY3,
KEY4,
FIRST TYPE CHAR10 VALUE 'FIRST',
SECOND TYPE CHAR10 VALUE 'SECOND',
THRIRD TYPE CHAR10 VALUE 'THIRD',
END OF S_STRUC.
DATA: ITAB LIKE S_STRUC OCCURS 0 WITH HEADER LINE.
DATA: V_INT TYPE INT4.
FIELD-SYMBOLS: <FS>, <FS1>.
DO 3 TIMES.
V_INT = SY-INDEX + 4.
ITAB-KEY1 = 'A'.
ITAB-KEY2 = 'B'.
ITAB-KEY3 = 'C'.
ITAB-KEY4 = 'D'.
ASSIGN COMPONENT V_INT OF STRUCTURE S_STRUC TO <FS>.
ASSIGN COMPONENT V_INT OF STRUCTURE ITAB TO <FS1>.
<FS1> = <FS>.
APPEND ITAB.
ENDDO.
LOOP AT ITAB.
WRITE: / ITAB.
ENDLOOP.
Regards
vasu -
How to display the Internal table records in table format?
Hi Gurus,
I want to display my print prg internal table records in d appropriate form in a table format, give some solution
with regards
ThambeThere are lot many options to do that
one way is create template in the maikn window and define the line types according to your data cretae text and put your data in the text and go to output options and give the line type to be used . You can also select details option to have lines in your output.
similarly YOU CAN CREATE TABLE IN THE MAIN WINDOW FOR THIS YOU DONT NEED TO DEFINE THE LINE TYPES .
WHEN YOU ARE IN MAIN WINDOW RIGHT CLICK ON TABLE AND GO TO PATH
CREATE -> TABLE
-> TEMPLATE
REWARD IF USEFUL
Regards,
Nageswar -
How to use the internal table of the submitted program
Hi,
In the main program i have submitted a program and that program is running successfully and data is populated in to it_final, now i want to use this data populated internal table it_final in my main program.
Thanks,
Sudhakar.Hi,Mathew,
*& Report ZMB51 *
REPORT ZMB51 .
DATA LIST_TAB TYPE TABLE OF ABAPLIST.
DATA: BEGIN OF olist OCCURS 0,
filler1(1500) TYPE c,
END OF olist.
submit <b>RM07DOCS</b> EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LIST_TAB
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
LIST_INDEX = -1
TABLES
LISTASCI = oLIST
LISTOBJECT = LIST_TAB
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3.
BREAK-POINT.
write:/ sy-subrc.
ENDIF.
OLIST will contain the report output that you have executed but you need to tweak this internal table so that it can be used for further processing.The current example will get you MB51 output into OLIST,so change the program name to your program name at the SUBMIT statement and then try.
K.Kiran. -
How i know when a EXECUTE_QUERY retrieved last record
Hi...
How i know when the EXECUTE QUERY retrieved the last record in a block ....?
Exist a trigger after trigger POST-QUERY?
Regards
Hector Gabriel Ulloa Ligarius
Santiago of Chile
http://es.groups.yahoo.com/group/desarrolloOracle/Kevin, sorry
But the :system.last_record not change the value during the execution of EXECUTE_QUERY.
Only useful when the data was retrieved into blocks...not during..
Other mode?
Regards
Hector Gabriel Ulloa Ligarius
Santiago of Chile
http://es.groups.yahoo.com/group/desarrolloOracle/ -
How to get the Database table behind condition records
Hello All
In transaction VK13, after giving condition type, I can select sales document.
For a given Sales Document number, there are several conditions.
How can i extract all the conditions for a given sales document?
I am coding a report for this. In which database table can i get the condition between sales document number & different conditions attached to it?
On the screen, i can see that the fields are from the structure KOMG. What is the corresponding table?
Thanks
Chandra SekharHi,
corersponding tables will be konp , a771,a511,a564
here i am providing you sample query related to it
{ -Get the Territory list price YPR0
SELECT vkorgau
zzland1_ag
zzmatgrade
a511~kfrst
datbi
datab
kbetr
INTO TABLE it_list1
FROM a511
JOIN konp
ON a511knumh = konpknumh
WHERE a511~kappl = 'V'
AND a511~kschl = 'YPR0'
AND vkorgau = '5000'
AND zzland1_ag = v_land1
AND loevm_ko <> 'X'.}
Thanks & Regards,
Sateesh.
Edited by: sateesh kumar on Nov 12, 2009 12:59 PM -
HOW to know the related tables in EBS source
Hi
My user wants to get the same columns like EBS front end in the OBIEE. What is best way to know what table belongs to the column in EBS Front end .
ThanksHello,
In Oracle EBS from the "Help"/"Record History" will give you the table/view name, when you can find here then use following menu functions (this will also give you additional information, like column details).
1) Open Forms
2) Click on Help/Diagnostics/Examine (*you might have to enter the APPS password at this point)
3) Change "Block" to "System"
4) Change "Field" to "Last_query"
Help Menu> Diagnostics> Examine. The system will ask for the password which is usually “apps”
And once you have you view or table info .. search in http://etrm.oracle.com/ for its base table information.
Hope this helps. Pls mark if it does.
Thanks,
SVS
Maybe you are looking for
-
How to use my dv camera on my mackbook(Late 2008)
hi... my name is Thiago.. and i have an sony digital video camera that i used in my old mackbook with a firewire 6 pin cable.. but now i cant use my camera because there is no firewire 6 pin connector in the macbook(late 2008) my camera have a firewi
-
What is the real scm latest version ?
What is the real scm latest version/patchset ? 10g, 9i or 9.0.4 ??
-
Document type UDO ignoring Period field
Hi all: I have a document type UDO that includes the automatically created "Period" field which links to financial periods (OFPR). However, apparently I cannot modify it in my form, as no matter what I write into the field the database always ends up
-
Function module table returning empty rows but export data is getting
Hi, I am executing function module through JCO after setting importing parameter and when i retrieve the table i get table with empty data 0 rows but i am able get export parameter data . when execute the same function module in abap through sap gui
-
HT201250 Time Machine freezes and screens are blank.
I recently upgraded my mid-2007 iMac to Mavericks. I determined it was a mistake due to system slowness and hangs. I'm trying to recover from backup but when using the command-R option for recovery, the systems hangs after I select the drive where T