Application Development and Automation 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: 
Read only

About BADIs

Former Member
0 Likes
1,228

I've got a question about modifying the behaviour of the standard transaction PA30 with a BADI.

I have this scenario:

I create a new record on infotype 16, then i press 'save' button.

The question is:

Does anybody know if "IN_UPDATE" method is executed after or before the record is inserted in pa0016???

It's very important.

11 REPLIES 11
Read only

Former Member
0 Likes
1,203

Hi,

Implement BADI : CHANGE_IN_UPDATE.

Method : CHANGE_AT_SAVE

It will work for you.

Regards,

Bhaskar

Read only

suresh_datti
Active Contributor
0 Likes
1,203

Jose,

From what I could understand in your previous , you are trying to update the ITXEX field so that the User will be forced to enter the text when they hit save in PA30. I doubt if this is possible. An 'X' in this field would make the icon appear on the screen to imply that long text is available. Even if you can force the text editor, ITXEX = 'X' would be COMMITTED to the database only when you exit the Transaction PA30. So, I do not know if what you are trying to do is possible at all.. Why don't you just prompt the user to maintain the longtext vai athe AFTER_INPUT metthod in the same BADI ? again, you probably have a business reason behind this attempt..

~Suresh

Read only

Former Member
0 Likes
1,203

That's exactly what i am trying to do.

When the user hits 'save' i check if he typed any text, if he didn't i force him to do it by showing the editor, after that i insert the text in cluster table. All this in after_input method.

My idea is update the flag 'itxex' directly from the created record in pa0016 in the event

in_update.

Do you think this is posible??

Otherwise, can you tell me more about your previous idea???

Thanks for all.

Read only

0 Likes
1,203

>>>if he didn't i force him to do it by showing the editor, after that i insert the text in cluster table.

This is what I am curious about.. where exactly is the User? in the Portal or the normal PA30 screen.. if it is PA30, why do YOU need to show the editor & take the trouble of saving it to the cluster? Can't the User simply press F9, enter the Text in the editor that opens up & SAVE ? Am I missing something here?

~Suresh

Read only

Former Member
0 Likes
1,203

Yes i'm in pa30.

I'm doing this because, that text is not obligatory, but in my case i need it to be.

So if the user don't type the text and clicks 'save' the record will be saved without the text, wich is the issue i'm trying to avoid.

Thanks

Read only

0 Likes
1,203

Hi jose,

About the BADI y dont you try to gve the message in PAI method that is provided in badi...

If the ITEXT is not initial user EDITOR-CALL and show thw MAintain Text Screen..>then the user will have to update the text....

I think Its simple...

I am sorry I cant provide you with the sample code.. as I haev changed the company and the coding I had done for Infotype 15 was in ewarlier company...

Read only

Former Member
0 Likes
1,203

I've just solved the problem. (I could modify flag 'itxex' in pa0016 table) but i've got another one.

When i access the data created via pa30, i only get the text icon when i hit 'modify' button, nevertheless when i click 'display' button the icon dosen't show anymore.

Has anyone got an idea???

Read only

0 Likes
1,203

I think the field ITEXT is not getting value 'X' when you are clicking on the display button..this is the problem.. jus check the PBO of the Infotype 16.. U may get it

Read only

0 Likes
1,203

Yes, you were right. Field ITXEX is empty

But i don't know why, because if i check pa0016 table using se11

the flag is actually set with 'X'.

Any ideas??

thanks in advice.

Read only

0 Likes
1,203

I will explain it with more details.

When the user types data in infotype 16, but he doesn't enter any text and click save button, my badi executes after_input method. This method checks if 'ITXEX' is marked.

If it is not, show text editor and store text in cluster table.

After that the method in_update is fired. In that method i update PA0016 record, to set the flag itxex.

The table is updated correctly and so is the text (checking wih se11)

After that operation system backs up to inital screen pa30, so if the next thing i do is display or modify the record i've just inserted, the icon is not shown.

But if i exit the transaction and re-enter then the text is always there.

I really need your help guys

thanks

Read only

Former Member
0 Likes
1,203

Anybodys's got an idea?