on 2007 Jul 31 7:25 AM
Hi,
Why Iam getting the error that TABLE is Unknown in this program.
PROGRAM ZMP_TAB3.
TABLES:
VBAK,
VBAP.
DATA:
IT_VBAP TYPE TABLE OF VBAP.
&----
*& Module USER_COMMAND_9001 INPUT
&----
text
----
MODULE USER_COMMAND_9001 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN SPACE.
<b>SELECT SINGLE * FROM VBAP INTO table IT_VBAP WHERE VBELN EQ</b> VBAK-VBELN.
ENDCASE.
ENDMODULE. " USER_COMMAND_9001 INPUT
Hi,
PROGRAM ZMP_TAB3.
TABLES:
VBAK,
VBAP.
DATA:
IT_VBAP TYPE TABLE OF VBAP.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_9001 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_9001 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN SPACE.
SELECT * FROM VBAP INTO table IT_VBAP WHERE VBELN EQ VBAK-VBELN. "Cannot use SINGLE and INTO TABLE together.
ENDCASE.
ENDMODULE. " USER_COMMAND_9001 INPUT
Regards,
Sesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi rams,
see this...
TABLES: VBAK,VBAP.
DATA: IT_VBAP TYPE TABLE OF VBAP.
*DATA: IT_VBAP TYPE STANDARD TABLE OF VBAP WITH HEADER LINE.
&----
*& Module USER_COMMAND_9001 INPUT
&----
text
----
MODULE USER_COMMAND_9001 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN SPACE.
SELECT * FROM VBAP INTO corresponding fields of table IT_VBAP WHERE VBELN EQ VBAK-VBELN.
ENDCASE.
ENDMODULE. " USER_COMMAND_9001 INPUT
Plz Reward points if contents are useful....
Regards,
Mandeep.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
try this
tables : vbak.
data : itab_vbak like vbak occurs 0 with header line.
select single * from vbak into corresponding fields of itab_vbak
where detid = zdepartment-detid.
Reward with points if useful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rams,
Other than <b>select *</b> few corrections in your code if you dont mind.
1. Always use the Exit Command in a seperate module. It should be the first module in the PAI of the screen.
2. While defining the PF-Status for the screen make sure you use the command type as E instead of ' ' (Space).
3. Its not suggested to write a select query in the USER_COMMAND. Write it in the PAI modules (other than User Command).
4. Its not even suggested to raise an error msg in USER_COMMAND, which means you can not use Chain Endchain in USER_COMMAND.
process after input.
module EXIT_COMMAND_0100 at exit-command.
" MODULE in the main program.
*&---------------------------------------------------------------------*
*& Module EXIT-COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module EXIT_COMMAND_0100 input.
case SY-UCOMM.
when 'BACK'
or 'CANC'
or 'EXIT'.
leave program.
endcase.
endmodule. " EXIT_COMMAND_0100 INPUT
Regards
Gopi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
TABLES:
VBAK,VBAP.
DATA:IT_VBAP TYPE standard TABLE OF VBAP with header line.
&----
*& Module USER_COMMAND_9001 INPUT
&----
text
----
MODULE USER_COMMAND_9001 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN SPACE. " select" not used space
select single onto corresponding fileds of table IT_VBAP WHERE VBELN EQ VBAK-vbeln
ENDCASE.
ENDMODULE. " USER_COMMAND_9001 INPUT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
even AFTER CHANGING THIS i am getting this error.You cannot use an internal table as a work area. What is the difference between using Sinle * and Just *.
SELECT SINGLE * FROM VBAP INTO table IT_VBAP WHERE VBELN EQ VBAK-VBELN.
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
make the changes based on your requirement..
PROGRAM ZMP_TAB3.
TABLES:
VBAK,
VBAP.
DATA:
IT_VBAP TYPE TABLE OF VBAP.
&----
*& Module USER_COMMAND_9001 INPUT
&----
text
----
MODULE USER_COMMAND_9001 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN SPACE.
<b>SELECT * FROM VBAP INTO table IT_VBAP WHERE VBELN EQ VBAK-VBELN.</b>
*or
*SELECT single * FROM VBAP INTO IT_VBAP WHERE VBELN EQ VBAK-*VBELN.
*append it_vbap.
ENDCASE.
ENDMODULE. " USER_COMMAND_9001 INPUT
All the best !!
Regards
Aparna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It will not work with select single because If SINGLE is specified, the resulting set has a single line. If the remaining additions to the SELECT command select more than one line from the database, the first line that is found is entered into the resulting set. The data objects specified after INTO may not be internal tables, and the APPENDING addition may not be used.
Try like this :
TABLES:
VBAK,
VBAP.
DATA:
IT_VBAP TYPE TABLE OF VBAP with header line.
&----
*& Module USER_COMMAND_9001 INPUT
&----
text
----
MODULE USER_COMMAND_9001 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN SPACE.
SELECT * FROM VBAP INTO table IT_VBAP
WHERE VBELN
EQ VBAK-VBELN.
ENDCASE.
ENDMODULE. " USER_COMMAND_9001 INPUT
Regards,
Himanshu
Message was edited by:
Himanshu Verma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
tables:VBAK,VBAP.
<b>DATA:IT_VBAP like VBAP occurs 0 with header line .</b>
&----
*& Module USER_COMMAND_9001 INPUT
&----
text
----
MODULE USER_COMMAND_9001 INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN SPACE.
<b>SELECT *</b> FROM VBAP INTO table IT_VBAP WHERE VBELN EQ VBAK-VBELN.
ENDCASE.
ENDMODULE. " USER_COMMAND_9001 INPUT
<b>REWARDS POINT</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
SELECT SINGLE * FROM VBAP INTO corresponding fields of table IT_VBAP WHERE VBELN EQ VBAK-VBELN.
regards
vijay
<b>reward if use4ful</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
declare the internal tables as
DATA: IT_VBAP TYPE STANDARD TABLE OF VBAP <b>WITH HEADER LINE</b>.
and see
<b>Reward points for useful Answers</b>
Regards
Anji
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you can't use select SINGLE with INTO.
Regards
Nicole
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Use this
SELECT * FROM VBAP INTO corresponding fields of table IT_VBAP WHERE VBELN EQ VBAK-VBELN.
Regards
Ravish Garg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.