08-29-2007 7:26 PM
Hi Gurus,
small question,
I am trying to retrieve data from the table T5UCA, but no data is coming from this table. Data is present in this table. I am just trying to retrieve bplan in my abap program with a simple select statement. This field is not producing any value. Please guide me.
Thanks
Ravi
08-29-2007 7:30 PM
I am getting it.
data : itab like standard table of T5UCA with header line.
select * up to 100 rows from t5uca into table itab where langu =
sy-langu.
loop at itab.
write / itab-ltext.
endloop.
send me your code ..
Thanks
Mahesh
08-29-2007 7:30 PM
I am getting it.
data : itab like standard table of T5UCA with header line.
select * up to 100 rows from t5uca into table itab where langu =
sy-langu.
loop at itab.
write / itab-ltext.
endloop.
send me your code ..
Thanks
Mahesh
08-29-2007 7:33 PM
my code is as follows
FUNCTION zhr_ben_worflow_data.
*"----
""Local interface:
*" IMPORTING
*" REFERENCE(PLANNAME) TYPE T5UCA-LTEXT
*" REFERENCE(PERNR) TYPE PA0001-PERNR OPTIONAL
*" REFERENCE(DEPENDANCY) TYPE T5UCF-LTEXT OPTIONAL
*"----
TABLES : t5uca.
DATA companycode TYPE pa0001-bukrs.
DATA bplan TYPE t5uca-bplan.
DATA depcv TYPE t5ucf-depcv.
DATA: lt_t5uca TYPE TABLE OF t5uca.
SELECT bplan into bplan FROM t5uca WHERE ltext EQ planname AND
barea EQ
'US'.
ENDSELECT.
ENDFUNCTION.
here planname is imported
Thanks a lot for quick reply mahesh
08-29-2007 7:41 PM
HI,
What i understand is that you are tying to read the data based on the long text that is the reason y you are not getting the data. the text that you are passing to the FM should be exaclty the same that you have in the table other wise it will not select.. say if you pas <b>PAS</b> and it is <b>pas</b> in the table then it is not selected.
is it not possible to pass BPLAN field to ur FM..
Thanks
Mahesh
08-29-2007 7:42 PM
LTEXT is case sensitive. Is it being imported in upper and lower case?
(changed planname to ltext).
Rob
Message was edited by:
Rob Burbank
08-29-2007 7:43 PM
Mahesh,
By using long text I have to get the bplan. How can I solve this problem.
08-29-2007 7:45 PM
Rob,
I gave the same long text from the table t5uca for testing purpose, still not retrieving any value. I tried in all ways I know. Can you suggest me how to solve.
08-29-2007 7:47 PM
HI try this way..
DATA : itab LIKE STANDARD TABLE OF t5uca WITH HEADER LINE.
DATA : lv_string(30) TYPE c.
lv_string = 'Alberta Health Care'.
SELECT * FROM t5uca INTO TABLE itab WHERE langu =
sy-langu AND barea EQ 'US'.
LOOP AT itab.
TRANSLATE lv_string TO UPPER CASE.
TRANSLATE itab-ltext TO UPPER CASE.
IF lv_string = itab-ltext.
WRITE / itab-bplan.
ENDIF.
ENDLOOP.
Thaks
Mahesh
08-29-2007 7:56 PM
OK - step back a bit. does this work:
REPORT ztest LINE-SIZE 80 MESSAGE-ID 00.
TABLES: t5uca.
PARAMETERS: planname LIKE t5uca-ltext.
DATA: bplan LIKE t5uca-ltext.
SELECT bplan INTO bplan
FROM t5uca
WHERE ltext EQ planname
AND barea EQ 'US'.
BREAK-POINT.
ENDSELECT.
Rob
08-29-2007 7:58 PM
08-29-2007 7:32 PM
whats your select statement like ??
Data: lt_tab type table of T5UCA.
Select * from T5UCA into table lt_tab where LANGU eq sy-langu.
if this doesn't give anything to you.. i am hoping you haven't updated the table from the Databse.. check the MANDT field from the DB.
Amandeep
08-29-2007 7:32 PM