cancel
Showing results for 
Search instead for 
Did you mean: 

Clear the Contents of a Textbox

Former Member
0 Kudos

Hi All,

I have created a flavour where i can reset password / check the first name and second name of a user by single click. Basically this is based on SU01 transaction.

I could get the required contents to my text boxes.

Now the challenge is to clear the content from those text boxes. I tried to use refresh screen thru launch button but couldnt vacate the boxes.

Could someone help me to have the desired result asap.

You can find the pic attached and help me asap.

Accepted Solutions (1)

Accepted Solutions (1)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Simply enter blank into the target fields via script steps.

Former Member
0 Kudos

Thanks Tamas,

You mean to enter value = null in the target fields... right?

But what if I have some 30 text boxes and need to vacate them.... do I have to enter blank for each and every text box

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

No, you'd use the Enter Value script action with a blank value field; and yes, you'll have to do this with all 30 fields separately since there is no mass data entry capability in Personas 2.0 scripting.

If you would leave the screen containing your custom fields, navigate to a different screen and return to the previous screen, then the custom fields would be cleared out but if you stay on the same screen, then you'll have to clear them out with your script.

Former Member
0 Kudos

i did tried to navigate to other screen and return to previous screen... but that too didnt solve the problem

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

This is not really a "problem" per se.

Just use the appropriate script steps to reset the fields then.

With navigation, I didn't just mean navigating there with the script behind the scenes. The other screen needs to show up and then a separate action (like a button press) is needed to return to the original screen so that the custom fields get cleared out.

Answers (1)

Answers (1)

Former Member
0 Kudos

hi nagesh,

when you press enter key the values from PBO are transferred to screen.

If there are no values in the PBO then screen fields gets cleared.

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Except for the user name, these all appear to be custom fields so they have no connection to the original backend screen. PBO won't have any effect on them.

former_member189862
Participant
0 Kudos

Hi Tamas,

Is there way we can achieve the same thing in Personas 3.0.?

Sorry for jumping into someone else thread.

I have custom fields in the 'Sales A' Tab.

I have a script that copies those to standard SAP fields once the user clicks on Copy Values.

Now if the user saves the sales order and still remains in the transaction VA01, when they start creating a new sales order, custom field values are still available as per previous sales order.

I have a limitation that I need to clear those values only ones when we come here for the first time. So I am not able to use a custom script to clear the values, because the values will be cleared always.

So basically I need to execute the clear script only once, any creative idea how I can handle that.

Appreciate your support.

Thanks

Kapil.

Former Member
0 Kudos

Hi Kapil,

please open a new thread, so everybody can participate in the thread.

Two ideas:

1. Add new steps to your script which is copying the values. After copying the values, set the value of the custom fields to blank.

2. Replace the save button by a script button. In the script press the original save button, leave VA01 and open it again.

I would prefer the first idea.

Regards

Björn

former_member189862
Participant
0 Kudos

Thanks Björn

I already have one open thread on this topic.

Option1 you suggested,  is actually what I already have in place now. However user is complaining if the values disappear after hitting the copy values button, so if they are still in the same sales order creation and they go to Item Overview tab again, they will feel that fields are blanked out they will get confused.

Option 2 is something which is doable, but how to capture the sales order number which will be posted because if I call VA01 again in background, I will probably loose the message that comes in status bar - sales order posted.

Plus my worry is in this the case of option 2 - if I get pricing errors etc while doing save - like in-completion log, my save script might get stopped by SAP standard errors ...

Not sure what is the best way to make it happen.

thanks for your support.