Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any Function module for Checking prt tool is Exists or not.

former_member196331
Active Contributor
0 Kudos
443

Hi.

I am facing one problem, need your suggestions.

Normally CF01  and CFo02  For using the PRT Creation, In routing CA03  For each operation We are assigning the PRT to the Each operation.

Table name is CRID., PRT Name will be saved at CRID tables.  PRT Name will be saved Under the fields

KTEXT_UP and KTEXT.

Please Have a look on below attached Image. Why some fields not able to filter from the Se16n.

If i write the below query in Se38  , Error is showing that KTEXT_UP Is Unknown.

SELECT * FROM crid INTO TABLE it_crid WHERE  KTEXT_UP = 'TEST'.


User is going to Enter the Prt Name in Excel like Test1, Test2.


I need to check it Whether it is exists or Not. Table level i tried above error is coming.

Is there any possibility to check it. How could i validate it.







1 ACCEPTED SOLUTION

thanh_dinh
Explorer
0 Kudos
87

Hi NewB To Abap 

4 last fields do not exist in CTID table. It's belonged to text table CRTX.
My solution is using Inner join Command:
select OBJTY 
          OBJID

from CRTX

inner join CRID

where CRID~OBJTY  = CRTX~OBJTY

    AND CRID~OBJID = CRTX~OBJID

    AND CRTX~KTEXT_UP = 'TEST'

    AND CRTX~spras = 'xxx' <== LANGUAGE KEY.

Thanh.

9 REPLIES 9

former_member226239
Contributor
0 Kudos
87

I guess the last 4 fields in the table CRID are custom fields and there is a restriction on those fields. That is the reason why you are not able to query on them.

-Chandra

0 Kudos
87

Ok , Thanks for your reply. Is there any possibility to access it.

I seen this type of scenario in other tables also. How could i access it.

thanh_dinh
Explorer
0 Kudos
88

Hi NewB To Abap 

4 last fields do not exist in CTID table. It's belonged to text table CRTX.
My solution is using Inner join Command:
select OBJTY 
          OBJID

from CRTX

inner join CRID

where CRID~OBJTY  = CRTX~OBJTY

    AND CRID~OBJID = CRTX~OBJID

    AND CRTX~KTEXT_UP = 'TEST'

    AND CRTX~spras = 'xxx' <== LANGUAGE KEY.

Thanh.

0 Kudos
87

Ok I will check it.

0 Kudos
87

Hi,

I hope i can use directly like below query.

SELECT CRTX~OBJTY CRTX~OBJID INTO TABLE IT_CRTX FROM CRTX WHERE  CRTX~KTEXT_UP = 'TEST'.


What will be the problem.

0 Kudos
87

That should be fine. There is no issue with it.

0 Kudos
87

I have to say sorry to you because my solution is not right. I thought and typed so fast then submitted. (Why they don't give us the "Edit" mode  )

1) 2 fields OBJTY and OBJID exist in table CRTX. So we don't need to use INNER JOIN. (The code I wrote to you surely have syntax error).
2) If we select data in 1 table. No need to add prefix:"CRTX~" <=Only use in INNER JOIN or OUTTER JOIN...command.
  Here is the right code:

          SELECT OBJTY
                        OBJID
   INTO TABLE IT_CRTX
             FROM
CRTX

          WHERE KTEXT_UP = 'TEST'.


I hope this issue is cleared.


Regards,

Thanh


0 Kudos
87

Ok Thanks for your reply.  Need small information. How did u find the Exact table name  Just Searching in the net. or In Se11 is there any filtering under package or function group. Because i tried a lot.

0 Kudos
87

You mean name of text table "CRTX"?
In SE16N, it's in the second row. ( All the fields appear in screen but it can not inputted, which exist in text table).

In SE11: Go to - Text table.