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: 

Table maintainance Generator

Former Member
0 Kudos

Hi ,

My requirment is after creating table maintainance generator,if we click on maintain button the entries of the table will be displayed. If we double click on any field the corresponding transaction need to be opened.If any one knows this problem please send the solution.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Sri,

When you create a View, you would have to assign that view to a function group before generating it. Create a function group in SE37 and assign that to your View while genration. Then once your view is generated and you display values get into debug mode (/h) and note the program name. It would be SAPLZ..... where Z..... is your function group name. Goto SE38 and display that program and you should find a couple of includes under

"* general include-files (never change, please) *".

one for subprograms and the other for PAI modules. copy the second include into a Zname. In this program (Zname) you'll find a case statement for "FUNCTION". and the value for FUNCTION when you duoble clicked is "DETA". you would find a perform statement under DETA. Comment that and add your own code to display the transaction you want to.

Hope it Helps.

Mouli

13 REPLIES 13

JozsefSzikszai
Active Contributor
0 Kudos

hi Srihari,

you have to change the generated FM behind the table maintenance view. The name of the function group you can see in SE11 (where you created the maintenance view). In SE80 you can have a look, basically you have to change the PAI module of the generated FM.

ec

0 Kudos

Hi Eric,

Thanks for giving good suggestion, actually i am doing the same only, but i am confusing on which code i need to write there. Please give me a some sample code there i have to write. Thanks in advance.

regards

Srihari.

Former Member
0 Kudos

go to that screen logic and write your code for double-click action in PAI.

-Muktar

0 Kudos

Hi muktar,

Thanks for giving advice , could please give me the code for that one..Thanks in advance.

Regards

Srihari.

Former Member
0 Kudos

Hi Sri,

When you create a View, you would have to assign that view to a function group before generating it. Create a function group in SE37 and assign that to your View while genration. Then once your view is generated and you display values get into debug mode (/h) and note the program name. It would be SAPLZ..... where Z..... is your function group name. Goto SE38 and display that program and you should find a couple of includes under

"* general include-files (never change, please) *".

one for subprograms and the other for PAI modules. copy the second include into a Zname. In this program (Zname) you'll find a case statement for "FUNCTION". and the value for FUNCTION when you duoble clicked is "DETA". you would find a perform statement under DETA. Comment that and add your own code to display the transaction you want to.

Hope it Helps.

Mouli

0 Kudos

thanks for that,

pls will you send peace of code for that its really urgent.

regards,

srihari.

0 Kudos

Add a perform following the steps i mentioned in my previous post.

eg.

CASE FUNCTION...

WHEN 'DETA'.

PERFORM GOTO_TCODE.

...

...

FORM GOTO_TCODE

GET CURSOR FIELD ZVIEWNAME-KUNNR VALUE V_KUNNR.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = V_KUNNR

IMPORTING

OUTPUT = V_KUNNR.

SET PARAMETER ID 'KUN' FIELD V_KUNNR.

CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.

ENDFORM. " GOTO_TCODE

This is an example which i've taken for a view showing KUNNR and its NAME1 from KNA1. and when you double click on the Cusotmer Number KUNNR it takes you to XD03.

Hope it Helps

Mouli

0 Kudos

Hi mouli,

Thanks for giving code.I wrote the code as you suggest.After that i activate the function group.After that i go to table maintainance generator ,double click on purchase order , the message comes "the function code is not set".Please guide what i have to do.Thanks in Advance.

0 Kudos

Hi experts,

I added the code as mouli suggested. But the problem is when i double click it field in table maintainance generator the message comes " Function code is not selected".Please give me the valuble suggestion.Its really urgent.Please.

Thanks in advance.

Regards

Srihari.

0 Kudos

Ok follow these steps.

Step1. Create a Z Function Group ( say eg. ZFG)

Step2. Create a view of your requirement.

step3. Generate the view by assiging your ZFG to you view.

Step4. Once view is generated you can dsiplay the view in SM30.

Step5. Now in the display mode double click on the PO number and get into debugging mode. (/h Mode)

Step6. Note the name of the main program.

Step7. Get into SE38 in change mode for the program whcih you noted.

Step8. You would notice a few includes listed. Your piece of code should sit in the second include under the comment

"* general include-files (never change, please) *"

Copy the second include into a Z name, add that in place of the other.

Step9. Your code should sit under

CASE FUNCTION ......

WHEN 'DETA'.

PERFORM GOTO_TOCDE.

FORM GOTO_TCODE

GET CURSOR FIELD ZVIEWNAME-EBELN VALUE V_EBELN.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = V_EBELN

IMPORTING

OUTPUT = V_EBELN.

SET PARAMETER ID 'BES' FIELD V_EBELN.

CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.

ENDFORM. " GOTO_TCODE

Hope it Helps.

Mouli

0 Kudos

Hi experts,

Actually what happening after creation of table maintainance generator is , when i am double clikc on the field the message comes as "Funcction code can be selected" . Any one tell me whats actually this meaning.How to overcome this problem and go to the relevant transaction when i double click the respective field.I already coded as above mouli suggested , but still i face the same problem. Please give the answers . Thanks in advance.

regards

Srihari.

0 Kudos

Can you call me on my mobile?

You could get it from my Business Card

- Mouli

0 Kudos

Hi mouli,

Thanks for giving valuble answer.Its really thanks a lot.

Regards

Srihari.