Standard table selection
Hi all,
I have a table with selection mode single set, and readOnly set, and rowSelectable set. I want to be able to select a single row, which opens a popop window (that works fine). The thing is: when I load the application and view where this table is displayed, the first row is selected by default. I still can select another row to display that's details in a popup, but the first row is selected (or highlighted in orange) as default.
Is there any way that no row is highlighted per default when I load the view/table?
Best regards, Matthias
just change the selection mode of your table in table properties as "singleNoLead" and it should work fine.Choose"MultiNoLead" if you want to select multiple rows from the table.
Kindly award points if this will solves your problem.
Similar Messages
-
Calling selection screen of a standard table
Hi All,
I want to call KNA1 table's Selection Screen' from a customized program. Can anyone let me know how to do this.
Customer program-->KNA1 table selection screen
Thank youHi,
goto se16 and give the table name, then execute it.
it will display the selection screen. Then GOto System in the menu entry. select the status. then will all information like program name and screen name and screen number.
<REMOVED BY MODERATOR>
Edited by: subas Bose on Apr 10, 2008 5:42 PM
Edited by: Alvaro Tejada Galindo on Apr 10, 2008 11:44 AM -
Standard table for finding query where used list
Are there any standard tables available to find the list of web templates, bex reports and views using a particular query?
i.e if i have the query name i should be able to find out where all it is being used.
Thanks,
ArchnaHello,
You have to join multiple tables to achieve this, here we go
FOR QUERY Related Information
RSRREPDIR - Directory of all reports (Query GENUNIID)
Choose Type of a reporting component -> REP
Tips :
Choose Type of a reporting component -> QVW for query view
SE11 -> RSZ* -> F4 gives you all tables related to queries
For WORKBOOK Related Information
Use the FM RRMX_WORKBOOK_QUERIES_GET to get the queries in a workbook by selecting the workbook ID from table RSRWORKBOOK
Tips :
SE11 -> RSRWB* -> F4 gives you all tables related to workbooks
SE37 ->RRMX_WORKBOOKS* -> F4 gives you all the FM related to workbooks
For Webtemplate Related Information
Choose the dataprovider for query / view ID.
SE11 -> RSZWOBJXREF - Structure of the BW Objects in a Template
Also see,
SE11 - > RSZWTEMPLATE - Header Table for BW HTML Templates
Thanks
Chandran -
How do I read this "standard" table in my Function Module?
I have a remote-enable Function Module (RFC). I am receiving two tables as part of the parameters. Table "A" is header information, and Table "B" is detail information. So for every 1 "A" header record, I may have 1 to many "B" detail records. I have a field we'll call "vendor_number" that is the common link between the two tables.
Here's what I want to do: I want to loop through table "A", and for each record, I want to do a READ on table "B", using the "ref_doc_no" from "A" as my key, to get the position of the first matching record. I hold onto the value of the table index and then start looping table "B", adding 1 to the saved table index each time to process all of the detail records.
Here's the problem: This worked great as an ABAP program. I had my "B" table declared with "ref_doc_no" as a non-unique key. But when I ported my code over to the RFC, it told me that the RFC could only deal with standard tables. I had to remove the "ref_doc_no" key declaration. So now when I try to activate, I get an error similar to this:
The declaration for the key field "another_field" is incomplete; however, "another_field" is contained in the key of table "B" and must be filled.
I don't understand that. I've not declared any keys for table "B". I don't understand why it's thinking I need to populate "another_field" (I don't even know what the value would be). My code to read the table (i.e. the line getting the error) is this:
Priming read on table (sets the initial sy-tabix index value)
READ TABLE it_incoming_invoice_line_item "table 'B'
WITH TABLE KEY ref_doc_no =
wa_incoming_invoice_header-ref_doc_no
INTO wa_incoming_invoice_line_item.
Is it possible for me to do some sort of direct read on a table in an RFC? The only alternative I can think of would be to have to loop through table "B" until I find the first occurrence of a match. Is that what I need to do?
Thanks everyone. Points, as always, awarded for helpful answers.Dave,
1. You can fire SELECTS in an RFC as well, but in your case the data exists in SYSTEM A and the RFC is in System B, so you can't do that. You can fire SELECTS on tables in the same system.
2. Quick example of two table loops - EKKO (HEADER) EKPO (ITEM).
LOOP AT EKKO.
LOOP AT EKPO WHERE EBELN = EKKO-EBELN.
ENDLOOP.
ENDLOOP.
I hope this is clear now.
Regards,
Ravi -
How to search records in a standard table with * ?
Hi everyone,
Can anyone tell me how to search records in a standard table with * ?
That is, in screen if user type * abc * for searching the records in which the field MC_STEXT contains 'abc'. What the code should be? How to complete the code below?
SELECT SINGLE objid FROM p1000 INTO p1000-objid,
WHERE MC_STEXT = ? .
Thanks!Hi
There are several way to do that, probably just as some guys wrote the easier way is to use LIKE in WHERE condition and the sign % instead of *:
V_STRING = '%ABC%'.
SELECT SINGLE objid FROM p1000 INTO p1000-objid,
WHERE MC_STEXT LIKE V_STRING.
U can also use a range (just like select-options):
RANGES: R_MC FOR P1000-MC_STEXT.
R_MC-LOW = 'ABC'.
R_MC(3) = 'ICP'.
APPEND R_MC.
SELECT SINGLE objid FROM p1000 INTO p1000-objid,
WHERE MC_STEXT IN R_MC.
Max -
ABAP XSLT transformation - XML to deep structure/nested standard table
Hi all,
I was struggling with this topic recently and couldn't find a single working example or description of a possible solution. So now that I've sorted it out, I did a quick example to elustrate how it works. Here is the code with XML embeded in it and the XSLT follows:
<HR>
<PRE>
*& Report Z_XML2ABAP
*& Author: Jayanta Roy
*& Date: 03/02/2010
REPORT z_xml2abap.
DATA input_xml TYPE string.
TYPES: BEGIN OF t_address,
house_no TYPE string,
street_name TYPE string,
city_name TYPE string,
phone_no TYPE string,
END OF t_address.
TYPES: t_addresses TYPE STANDARD TABLE OF t_address with NON-UNIQUE KEY house_no.
TYPES: BEGIN OF t_person,
firstname TYPE string,
surname TYPE string,
addresses TYPE t_addresses,
END OF t_person.
input_xml = '<Friends>' &&
'<People>' &&
'<FirstName>Homer</FirstName>' &&
'<Surname>Simpson</Surname>' &&
'<Address>' &&
'<HouseNo>123</HouseNo>' &&
'<Street>Evergreen Terrace</Street>' &&
'<City>Springfield</City>' &&
'<PhoneNo>011212321</PhoneNo>' &&
'</Address>' &&
'<Address>' &&
'<HouseNo>7G</HouseNo>' &&
'<Street>Neuclear Power Plant</Street>' &&
'<City>Spring Field</City>' &&
'<PhoneNo>911</PhoneNo>' &&
'</Address>' &&
'</People>' &&
'<People>' &&
'<FirstName>Bart</FirstName>' &&
'<Surname>Simpson</Surname>' &&
'<Address>' &&
'<HouseNo>123x</HouseNo>' &&
'<Street>Evergreen Terracex</Street>' &&
'<City>Springfieldx</City>' &&
'<PhoneNo>011212321x</PhoneNo>' &&
'</Address>' &&
'</People>' &&
'</Friends>' .
DATA lt_person TYPE STANDARD TABLE OF t_person.
TRY.
CALL TRANSFORMATION xslt_person
SOURCE XML input_xml
RESULT all_people = lt_person.
CATCH cx_root.
WRITE 'Problemo!'.
ENDTRY.
WRITE 'Now, debug the program to see the values read from the XML'.
</PRE>
<HR>
and here is the XSLT Transformation program (xslt_person):
<HR>
<PRE>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<ALL_PEOPLE>
<xsl:apply-templates select="//People"/>
</ALL_PEOPLE>
</asx:values>
</asx:abap>
</xsl:template>
<xsl:template match="People">
<ALLMYFRIENDS> <!This element name is not relevent... needed to just group the loop>
<FIRSTNAME>
<xsl:value-of select="FirstName"/>
</FIRSTNAME>
<SURNAME>
<xsl:value-of select="Surname"/>
</SURNAME>
<ADDRESSES>
<xsl:for-each select="Address">
<ADDRESS> <!This element name is not relevent... needed to just group the loop>
<HOUSE_NO>
<xsl:value-of select="HouseNo"/>
</HOUSE_NO>
<STREET_NAME>
<xsl:value-of select="Street"/>
</STREET_NAME>
<CITY_NAME>
<xsl:value-of select="City"/>
</CITY_NAME>
<PHONE_NO>
<xsl:value-of select="PhoneNo"/>
</PHONE_NO>
</ADDRESS>
</xsl:for-each>
</ADDRESSES>
</ALLMYFRIENDS>
</xsl:template>
</xsl:transform>
</PRE>
<HR>
HTH,
Jayanta.thanks a LOT Jayanta..
I was looking for an XSLT example for some time.. this one atleast got me started in the right direction..
THANKS -
Read a csv file, fill a dynamic table and insert into a standard table
Hi everybody,
I have a problem here and I need your help:
I have to read a csv file and insert the data of it into a standard table.
1 - On the parameter scrreen I have to indicate the standard table and the csv file.
2 - I need to create a dynamic table. The same type of the one I choose at parameter screen.
3 - Then I need to read the csv and put the data into this dynamic table.
4 - Later I need to insert the data from the dynamic table into the standard table (the one on the parameter screen).
How do I do this job? Do you have an example? Thanks.Here is an example table which shows how to upload a csv file from the frontend to a dynamic internal table. You can of course modify this to update your database table.
report zrich_0002.
type-pools: slis.
field-symbols: <dyn_table> type standard table,
<dyn_wa>,
<dyn_field>.
data: it_fldcat type lvc_t_fcat,
wa_it_fldcat type lvc_s_fcat.
type-pools : abap.
data: new_table type ref to data,
new_line type ref to data.
data: xcel type table of alsmex_tabline with header line.
selection-screen begin of block b1 with frame title text .
parameters: p_file type rlgrap-filename default 'c:Test.csv'.
parameters: p_flds type i.
selection-screen end of block b1.
start-of-selection.
* Add X number of fields to the dynamic itab cataelog
do p_flds times.
clear wa_it_fldcat.
wa_it_fldcat-fieldname = sy-index.
wa_it_fldcat-datatype = 'C'.
wa_it_fldcat-inttype = 'C'.
wa_it_fldcat-intlen = 10.
append wa_it_fldcat to it_fldcat .
enddo.
* Create dynamic internal table and assign to FS
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = it_fldcat
importing
ep_table = new_table.
assign new_table->* to <dyn_table>.
* Create dynamic work area and assign to FS
create data new_line like line of <dyn_table>.
assign new_line->* to <dyn_wa>.
* Upload the excel
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = p_file
i_begin_col = '1'
i_begin_row = '1'
i_end_col = '200'
i_end_row = '5000'
tables
intern = xcel
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
* Reformt to dynamic internal table
loop at xcel.
assign component xcel-col of structure <dyn_wa> to <dyn_field>.
if sy-subrc = 0.
<dyn_field> = xcel-value.
endif.
at end of row.
append <dyn_wa> to <dyn_table>.
clear <dyn_wa>.
endat.
endloop.
* Write out data from table.
loop at <dyn_table> into <dyn_wa>.
do.
assign component sy-index of structure <dyn_wa> to <dyn_field>.
if sy-subrc <> 0.
exit.
endif.
if sy-index = 1.
write:/ <dyn_field>.
else.
write: <dyn_field>.
endif.
enddo.
endloop.
REgards,
RIch Heilman -
How to populate f4 values to standard pnp selection screen fields
Hi Experts,
my question is how to populate f4 values to standard pnp selection screen field. i am using LDB PNP for a report , it displays several fields with f4 values, i need to remove all the stadard f4 values and want to place my f4 values in the selection screenHi Venkat,
To put ur own values in the F4 help of any field...all u have to do is.
1st fetch all the records that u need to display in F4 help list...in one internal table.
and then use the function module 'F4IF_INT_TABLE_VALUE_REQUEST'
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield =
value_org =
tables
value_tab =
return_tab =
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
where retfield is the field for which u need to give the F4 help.
and valu_tab is the internal table in which u have the list of records to be displayed.
this would do the work...
I dont have the system in front of me...as soon as i have...will try to send a piece of code, to make ur work easy.
Till then hope this helps u...all the best
Regards,
Radhika -
Inserting record in standard table
Dear Sapians
I want to insert a record in standard table PRPS for testing one scenario. we tried to insert through abap program but we are unable to insert data in the PSPNR field.
Best regards
Sukumaran.Ehi,
check this code it may help u,
TABLES : AFKO,
AFPO.
DATA : BEGIN OF GI_AFKO OCCURS 1,
AUFNR LIKE AFKO-AUFNR,
END OF GI_AFKO.
data gi_AFPO like ZPRODUCT occurs 0 with header line.
*DATA : BEGIN OF GI_AFPO OCCURS 100,
MANDT LIKE
MATNR LIKE AFPO-MATNR,
DWERK LIKE AFPO-DWERK,
END OF GI_AFPO.
DATA: gv_date(11)," LIKE ekpo-aedat,
gv_date1(11),
year(4),
month(2),
day(2),
flag(1),
read_flag(1).
START-OF-SELECTION.
gv_date1 = sy-datum.
year = gv_date1+0(4).
month = gv_date1+4(2).
day = gv_date1+6(2).
year = year - 3.
CLEAR gv_date1.
CONCATENATE year month day INTO gv_date1.
select aufnr
from afko
into table gi_afko
where ( GLTRP <= sy-datum AND gltrp >= gv_date1 ) .
IF SY-SUBRC = 0.
select matnr
dwerk
from afpo
into CORRESPONDING FIELDS OF table gi_afpo
for all entries in gi_afko
where aufnr = gi_afko-aufnr.
ENDIF.
SORT GI_AFPO BY MATNR.
IF NOT GI_AFPO[] IS INITIAL.
MODIFY ZPRODUCT FROM TABLE GI_AFPO.
IF SY-SUBRC = 0.
MESSAGE I003 WITH 'VALUES UPDATED IN TO TABLE ZPRODUCT'.
ELSE.
MESSAGE I003 WITH 'VALUES NOT UPDATED IN TO TABLE ZPRODUCT'.
ENDIF.
regards
siva -
Standard Table to be updated based on User action
Hi Friends ,
i have a requirement , its a report and in that based on the user action ( if the user checks a check box that is available in the output screen of the report and saves it) the value should be updated in a standard table as 'X'. I have appended the field in the standard table and now i need to write a logic at user command to populate the zfield that i have added in the table based on the user's input. Can someone suggest me how to proceed further on this ? Kindly let me know if you have any sample piece of code related to this scenario...
thanks in advance.HI,
Usually we can udpate the tables using UPDATE statement.
But SAP will not suggest to use these statements which will hit the table directly. We need to use the standard transactions to create or update the standard tables.
For eg: you are using a ztable.
then once your report is ready, then use the user_command form ( for ALV) .
fetch the records where the user have selected the records ( check box = 'X").
*& Form USER_COMMAND
FORM user_command USING g_ucomm TYPE sy-ucomm
gs_selfield TYPE slis_selfield .
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ls_ref1.
CALL METHOD ls_ref1->check_changed_data .
this will update the check box values in your internal table.
now you can use
loop at itab into wa where check eq 'X'.
fill your final internal table where you need to update the table.
endloop.
loop at newtable.
update ztable set value = 'X'
where keyfield = w_keyfield.
if sy-subrc eq 0.
message s000.
endif.
endloop.
endform.
regards,
Venkatesh -
Hi All,
Please help me to resolve this Issue.
Internal table - IT which has table name like
KOTH600
KOTH601
KOTH602
KOTH603 , All these table has field KNUMH.
Loop at IT into WA. ( which has table name in it )
select * from (WA-TABNAME) into (New_WA)
where KNUMH = '100010'.
write:/ New_WA - NAME.
Endloop.
Here issue is table name is dynamic and depending upon this New_WA will change. How can I give both table name and work-area dynamic. ( I do not wish to define 4 new work-area, one for each to handle this situation as number of tables will increase going further ).
Thanks in advance,
Regards,
Mayank Rajguru.In this example you have what you are looking for. Create dinamyc tables.
REPORT Z_DUMMY_ATG NO STANDARD PAGE HEADING MESSAGE-ID SAPLWOSA.
*=======================================================================
Variables*
*=======================================================================
DATA DESCR_STRUCT_REF TYPE REF TO CL_ABAP_STRUCTDESCR.
DATA WA_FCAT TYPE LVC_S_FCAT.
DATA IT_FIELDCATALOG TYPE LVC_T_FCAT.
DATA DATAREF TYPE REF TO DATA.
DATA: ONE LIKE PCFILE-DRIVE,
TWO LIKE PCFILE-PATH,
LONG TYPE I,
FLAG TYPE C,
FILEPATH(128) TYPE C,
FILE_TAB TYPE STRING,
TABNAME LIKE DD02L-TABNAME.
*=======================================================================
Field-Symbols.*
*=======================================================================
FIELD-SYMBOLS:
<ROW> TYPE ANY TABLE,
<TABLE> TYPE STANDARD TABLE,
<COMPONENT> TYPE ABAP_COMPDESCR,
<FS> TYPE ANY.
*=======================================================================
Selection screen*
*=======================================================================
SELECTION-SCREEN BEGIN OF BLOCK DATA WITH FRAME TITLE TEXT-T01.
PARAMETERS:
TABNAM(128) TYPE C,
FUNCTION(1) TYPE C OBLIGATORY,
LISTNAME LIKE RLGRAP-FILENAME.
SELECTION-SCREEN END OF BLOCK DATA.
*=======================================================================
At Selection screen*
*=======================================================================
AT SELECTION-SCREEN ON VALUE-REQUEST FOR LISTNAME.
PERFORM GET_FILENAME CHANGING LISTNAME.
*=======================================================================
Start-of-selection*
*=======================================================================
START-OF-SELECTION.
CLEAR FLAG.
PERFORM LOAD_DATA USING TABNAM.
PERFORM VERIFY_TABLE USING TABNAM CHANGING FLAG.
IF FLAG NE 'X'.
IF FUNCTION EQ 'D'.
PERFORM CREATE_TABLE USING TABNAM.
PERFORM DOWNLOAD_TABLE USING TABNAM.
ELSE.
PERFORM CREATE_TABLE USING TABNAM.
PERFORM UPLOAD_TABLE USING TABNAM.
ENDIF.
ELSE.
MESSAGE S000 WITH 'The proposed table doesn''t exist.'.
ENDIF.
FORM GET_FILENAME **
Name of the directory.*
FORM GET_FILENAME CHANGING LISTNAME.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = LISTNAME
DEF_PATH = 'C:\downloads\list'
MASK = ',.,.. '
MODE = 'S'
TITLE = 'Save as'
IMPORTING
FILENAME = LISTNAME
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
ENDFORM.
FORM LOAD_DATA **
Specifies the path and table name*
FORM LOAD_DATA USING MY_TAB.
DATA: W_FILE LIKE PCFILE-PATH.
W_FILE = LISTNAME.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
COMPLETE_FILENAME = W_FILE
IMPORTING
DRIVE = ONE
PATH = TWO
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5.
CONCATENATE ONE ':' TWO INTO FILEPATH.
CONCATENATE FILEPATH MY_TAB '.txt' INTO FILE_TAB.
ENDFORM.
FORM DOWNLOAD_TABLE **
Downloads the table data.*
FORM DOWNLOAD_TABLE USING MY_TAB.
*SELECT **
INTO TABLE <ROW>
FROM (MY_TAB).
ASSIGN <ROW> TO <TABLE>.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = FILE_TAB
FILETYPE = 'ASC'
TABLES
DATA_TAB = <TABLE>
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6.
IF SY-SUBRC EQ 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
TITEL = 'Successful Download'
TXT1 = 'All the data from the table'
TXT2 = 'was correctly downloaded.'.
ELSE.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
TITEL = 'Download Error!'
TXT1 = 'The data of the table'
TXT2 = 'couldn''t be downloaded.'.
ENDIF.
ENDFORM.
FORM UPLOAD_TABLE **
Table Upload.*
FORM UPLOAD_TABLE USING MY_TAB.
ASSIGN <ROW> TO <TABLE>.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = FILE_TAB
FILETYPE = 'ASC'
IMPORTING
FILELENGTH = LONG
TABLES
DATA_TAB = <TABLE>
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7.
MODIFY (MY_TAB) FROM TABLE <TABLE>.
IF SY-SUBRC EQ 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
TITEL = 'Successful Upload'
TXT1 = 'All the data from the table'
TXT2 = 'was correctly uploaded.'.
ELSE.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
TITEL = 'Upload Error!'
TXT1 = 'The data of the table'
TXT2 = 'couldn''t be uploaded.'.
ENDIF.
ENDFORM.
FORM CREATE_TABLE **
Creates a dynamic internal table.*
FORM CREATE_TABLE USING MY_TAB.
CREATE DATA DATAREF TYPE (MY_TAB).
ASSIGN DATAREF-> TO <FS>.*
DESCR_STRUCT_REF ?= CL_ABAP_TYPEDESCR=>DESCRIBE_BY_DATA( <FS> ).
LOOP AT DESCR_STRUCT_REF->COMPONENTS ASSIGNING <COMPONENT>.
WA_FCAT-FIELDNAME = <COMPONENT>-NAME.
WA_FCAT-REF_TABLE = MY_TAB.
WA_FCAT-REF_FIELD = <COMPONENT>-NAME.
APPEND WA_FCAT TO IT_FIELDCATALOG.
ENDLOOP.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_FIELDCATALOG
IMPORTING
EP_TABLE = DATAREF
EXCEPTIONS
GENERATE_SUBPOOL_DIR_FULL = 1
OTHERS = 2.
ASSIGN DATAREF-> TO <ROW>.*
ENDFORM.
*& Form VERIFY_TABLE
The table must exist!*
FORM VERIFY_TABLE USING TABNAM CHANGING FLAG.
SELECT SINGLE TABNAME
INTO (TABNAME)
FROM DD02L
WHERE TABNAME EQ TABNAM.
IF SY-SUBRC NE 0.
FLAG = 'X'.
ENDIF.
ENDFORM. -
Number of records in a standard table
Hi,
How to find number of records, without fetching them into a internal table?
is there any command for that?
I want to know the number of records of a standard table in a report.
ThanksHi,
If you want to know the number of records in your internal table after select statement.
You can use the below statement.
data : wa_lines like sy-tfill.
DESCRIBE TABLE itab LINES WS_LINES.
In wa_lines you will have the number of records.
If you want to know the number of records from standard itself.
You can use below :
select count(*) from table into variable
endselect.
Thanks,
Sriram Ponna. -
Unusual problem(in table selection screen)
Hi ALL,
I HAVE A ZTABLE IN WHICH I HAVE A AUFNR FIELD.
i have records with my username and for that record i have
a order no i.e aufnr has a value.
When i give the only the order number in my selection screen(se11
) it says
no records found ,if i put a star at the end for the order then it
gives me the record.
The length of the field is 12 char
and it has convers routine ALPHA for the domain.
The field is AUFNR.
The values for my record is of length 6,even if i add zeros in the front, iam not able to get that record thisis in the selection screen of SE11.
i HAVE to RETRIEVE DATA BASED ON THIS FIELD USING SELECT statement ,BUT IT ALWAYS RETURN SY-SUBRC 4.
cAN SOMEBODY EXPLAIN AS TO WHY IS THIS HAPPENNING AND WHAT SHOULD I DO TO OVER COME THIS
THANKS
KajolI really think that you need to keep to the length of 12 for this field in the database and yes it would have leading zeros in the db table. Make the field in your DB table 12, you may have to write a conversion program to convert the field values already in the DB to 12 instead of the 10.
Question(just curious) why did you make the field 10 instead of 12? Someone tell you to do that?
My suggestion when working with custom tables that use "Standard" table fields, like AUFNR or VBELN etc, is to always use the data element which from the standard table, this way you know that the value will be stored the same way, and all will be consistant.
Regards,
Rich Heilman -
Short dumop in J2I5 (provide duplicate entry in Standard table)
Hello Expert ,
We have a problem in T.Code J2I5 ( Excise Register Extraction) input entry is lelect Excise group 20 . and a date from 04.08.09 onwards. and select the register RG23D . it shows the run time error ( Eg The ABAP/4 Open SQL array insert results in duplicate database record ) . but in the standard Tcode is there possible to provide duplicate entry in Standard table
Thaks & regards
Aditya Kr TripathiRuntime Errors SAPSQL_ARRAY_INSERT_DUPREC
Except. CX_SY_OPEN_SQL_DB
Date and Time 29.01.2010 10:57:09
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
problem occurs in this code :
assign I_RG23D_TAB-I_RG23D_TYP to <x_rg23dtyp> casting.
<x_extrctdata> = <x_rg23dtyp>.
class CL_ABAP_CONTAINER_UTILITIES definition load.
call method CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C
EXPORTING
IM_VALUE = i_rg23d_tab-i_rg23d_typ
IMPORTING
EX_CONTAINER = i_report_tab-extrctdata
EXCEPTIONS
ILLEGAL_PARAMETER_TYPE = 1
others = 2.
I_REPORT_TAB-EXTRCTDATA = I_RG23D_TAB-I_RG23D_TYP.
COMPUTE I_REPORT_TAB-EXTRCTLNGT = STRLEN( I_REPORT_TAB-EXTRCTDATA ).
APPEND I_REPORT_TAB.
ENDLOOP.
IF M_EXTRACTED = 'X'.
LOOP AT I_RG23D_KEY.
DELETE
FROM J_2IEXTRCT
WHERE BUDAT = I_RG23D_KEY-BUDAT
AND SERIALNO = I_RG23D_KEY-SERIALNO
AND REGISTER = I_RG23D_KEY-REGISTER
AND EXGRP = I_RG23D_KEY-EXGRP.
ENDLOOP.
ENDIF.
Control table check here for data Extraction
INSERT J_2IEXTRCT FROM TABLE I_REPORT_TAB.
If the insertion of the extract table is successfull then the table
for Extraction is Inserted
IF SY-SUBRC EQ 0.
PERFORM FILL_EXTDT USING C_RG23D M_EXTRACTED.
ENDIF.
ENDFORM. " RG23D
*& Form RG23CPART1
Purpose : RG23C Part I extraction logic
FORM RG23CPART1.
DATA: $PART1 TYPE PART1_TYP,
$LINCNT LIKE SY-LINCT,
M_EXTRACTED VALUE '',
$RC LIKE SY-SUBRC.
*********************************************************************************************8 -
How to Fetch Data From Standard Table MARA and Display using BOPF ?
Hello All,
In BOPF creation of Quey to a node fetches data from the Data Base Table attached to that Node,
But in my requirement I have to fetch data Present in a Standard table and Display it in the FPM List Using FBI.
** Can we Fetch the data From Standard Table and fill the Node in BOPF, Is this possible as the standard Table do not contain KEY field which BOPF uses for Data Fetching ?
Kindly share your Idea's .
Thanks in Adv.Hi Dhivya,
Thanks For your Response.
In my Requirement I want to make ROOT Node as Transient Node.
When I create a Sub Node to a Root Node, I am able to get this option to make this sub node as a Transient Node .
By selecting 'Standard<-->Extended' option in the Menu item 'GoTo' I am able to get this Transient Node check box field for the Sub Nodes.
I want to make a ROOT Node as a Transient Node.
(Which Version you are using, and which transaction you are using to create BO . we are using BOBX Transaction, Version Ehp 6 )
Kindly Guide me .
Thanks,
Kranthi Kumar.
Maybe you are looking for
-
i am looking for an iPad App that will play a specific iTunes song, at a specific time, on a specific day? Thank you all!
-
NEW to pse and to forum, how to add a frame?
I have never used Photoshop. I would like to add a white frame around a photo. can anyone share how to do this? I hope i can figure out how to get back here to read the answer! LOL
-
Hi there, I have created this code below. The select statement works, however the delete statement does not work. DECLARE @CategoryASVARCHAR(255) DECLARE @NameASVARCHAR(255) DECLARE @Name1ASVARCHAR(255) DECLARE @ParentTypeAsint SET @Category='Genera
-
Is Texas Instruments the built in Firewire chipset for my G5
Hi, With the info supplied would you be able to tell me what brand of built in firewire chipset I have on my Mac (TI, VIA, etc....)? I am experiencing audio problems. Also is there a part number? MAC G5 MODEL -- A1047 [SALES MODEL M9454LL/A] SPEED –
-
Adobe Interactive Form in a Webdynrp
Hi, I have an issue with a interactive form in a Webdynpro. To explain the problem I will need to give a little intro on what this application does. We have a webdynpro with a button (SAVE) and a interactive form in which users can enter information