2010 Jul 21 2:15 PM
Hello guys,
I'm using a parameter where I give an option to enter the Infotype from the custom table.
In custom table, the Infotype is stored as 0000 for pa0000.
Depending upon the selection made in the selection screen, I have to select the records from the infotype.
Kindly guide me.
2010 Jul 21 2:40 PM
PARAMETERS: pa_innn(4) TYPE n.
DATA: g_innn_name(6) TYPE n.
DATA: gr_innn TYPE REF TO data.
"construct infty name
CONCATENATE 'PA' pa_innn INTO g_innn_name.
"create target area as line of infty table
CREATE DATA gr_innn TYPE (g_innn_name).
FIELD-SYMBOLS: <wa_innn> TYPE ANY,
<field_innn> TYPE ANY.
ASSIGN gr_innn->* TO <wa_innn>.
"get data
SELECT * FROM (g_innn_name) INTO <wa_innn> UP TO 10 ROWS.
"example way of data display
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE <wa_innn> TO <field_innn>.
IF sy-subrc = 0.
WRITE <field_innn>.
ELSE.
EXIT.
ENDIF.
ENDDO.
NEW-LINE.
ENDSELECT.Regards
Marcin
Hello guys,
I'm using a parameter where I give an option to enter the Infotype from the custom table.
In custom table, the Infotype is stored as 0000 for pa0000.
Depending upon the selection made in the selection screen, I have to select the records from the infotype.
Kindly guide me.
2010 Jul 21 2:34 PM
you can use table T777D to get the database table (DBTAB) for an infotype (INFTY).
All infotypes have the same key (structure PAKEY) and header (strucuture PSHD1).
If you only have to select by key- or header fields no dynamic WHERE clause is needed.
2010 Jul 21 2:40 PM
PARAMETERS: pa_innn(4) TYPE n.
DATA: g_innn_name(6) TYPE n.
DATA: gr_innn TYPE REF TO data.
"construct infty name
CONCATENATE 'PA' pa_innn INTO g_innn_name.
"create target area as line of infty table
CREATE DATA gr_innn TYPE (g_innn_name).
FIELD-SYMBOLS: <wa_innn> TYPE ANY,
<field_innn> TYPE ANY.
ASSIGN gr_innn->* TO <wa_innn>.
"get data
SELECT * FROM (g_innn_name) INTO <wa_innn> UP TO 10 ROWS.
"example way of data display
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE <wa_innn> TO <field_innn>.
IF sy-subrc = 0.
WRITE <field_innn>.
ELSE.
EXIT.
ENDIF.
ENDDO.
NEW-LINE.
ENDSELECT.Regards
Marcin
2010 Jul 21 2:49 PM
2010 Jul 21 3:02 PM
LOL. Maybe we share the same knowledge database but I am using indices to fetch my entry or maybe just your basis guys are on holiday and your system is overloaded I am sure if you complaint a little bit more it will improve
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |