10-21-2008 5:49 AM
Hi friends,
In a module pool program iam working on a select statement as shown below.
SELECT SINGLE * FROM zekko_94176 INTO zekko_94176 WHERE ebeln EQ zekko_94176-ebeln.
Here zekko_94176 is screen workarea . Though the value is present in the database table zekko_94176
select statement is not retrieving it.So, its giving a sy-subrc value of 4.
Please help me regarding this.......
<removed_by_moderator>
Thanks in advance...
Venu.
Edited by: Julius Bussche on Oct 21, 2008 12:15 PM
10-21-2008 5:50 AM
Hi,
What value is present in "zekko_94176-ebeln.", go and check the table whether any record exists for the given condition.
Thanks & Regards,
Navneeth K.
10-21-2008 5:50 AM
Hi,
What value is present in "zekko_94176-ebeln.", go and check the table whether any record exists for the given condition.
Thanks & Regards,
Navneeth K.
10-21-2008 5:52 AM
Hi Venu,
Did you check in the debug mode what the value is coming in the output.
zekko_94176-ebeln
Check the value in the output.
Thanks,
Chidanand
10-21-2008 5:53 AM
Hi,
At run time in debugging mode check whether zekko_94176-ebeln holds value or not.. other than that everything seems to be fine..
Rgds.,
subash
10-21-2008 5:56 AM
Hi Venu,
I think the below code will surely help you.
No need of declaring any workarea.
You can directly name the screen fields with the name of the table fields.
Write this kind of code in PBO.
Here the screen fields are named as Z101754SBOOKHDR-bookid,
Z101754SBOOKHDR-custid... etc.
module STATUS_2000 output.
CASE OK_CODE1.
WHEN 'DISPLAY'.
LOOP AT SCREEN.
IF SCREEN-NAME NE 'PROCEED'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
SELECT BOOKID CARRID CONNID FLDATE CUSTNAME TELEPHONE
FROM Z101754SBOOKHDR INTO
CORRESPONDING FIELDS OF Z101754SBOOKHDR WHERE
BOOKID = Z101754SBOOKHDR-BOOKID.
ENDSELECT.
WHEN 'CHANGE'.
SELECT BOOKID CARRID CONNID FLDATE CUSTNAME TELEPHONE
FROM Z101754SBOOKHDR INTO
CORRESPONDING FIELDS OF Z101754SBOOKHDR WHERE
BOOKID = Z101754SBOOKHDR-BOOKID.
ENDSELECT.
ENDCASE.
endmodule. " STATUS_2000 OUTPUT
Regards,
Amit.
10-21-2008 5:56 AM
hi,
check two things:
=> whether there is any record corresponding to the ebeln u r entering in table zekko_94176 .
=>.is there any conversion routine for ebeln in zekko_94176 table,if so then first convert ebeln into internal format and then pass it ur select query..
10-21-2008 5:59 AM
HI,
Are you referred standard EBELN data element with domain EBELN. if that is the case for this field there will be ALPHA conversion routine will exists please check that. May be because of that while selecting using select statement it will consider leading zeros also but those zeros were not taking into consideration while entered that value so please do handle this leading zeros by taking another intermediate variable with length 10 and type of numc and then push that ebeln value into this before select statement and use that in select statement.
Hope this will give you some idea,
Regards,
Aswini.
10-21-2008 6:02 AM
Hi try this
SELECT SINGLE * FROM zekko_94176 INTO
(zekko_94176-<field name>, zekko_94176-<field name>)
WHERE ebeln = zekko_94176-ebeln.
This condition will work.
Cheers!!
Balu
.
10-21-2008 6:08 AM
Hi,
check with value of ebeln weather it ezists in data base table or not.
Or try like this..
SELECT SINGLE * FROM zekko_94176 INTO corresponding fielids of table zekko_94176 WHERE ebeln EQ zekko_94176-ebeln.
Run the program in debug mode.
thanks
rajesh kumar
10-21-2008 11:21 AM
Where are you writing your query, I hope it is in the PAI of the screen you are processing. Also make sure that the zekko_94176-ebeln is populated with some value. Put a break point on this statment and run your program and see.
regards,
Advait
Edited by: Advait Gode on Oct 21, 2008 12:21 PM
10-21-2008 11:25 AM
10-21-2008 1:01 PM
Hi ,
thanks to all ur suggestions....
my problem is solved....
Regards,
Venu..............