cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a line item to an existing sales order?

Former Member
0 Kudos

Is it possible to open an existing sales order, find the first available empty line and then add a new line in that position? How can I navigate to the first open line item?

Regards.

Patrick.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

There's a button below the line items table in VA02 - this one - that adds a new line and scrolls the grid to a standard position, with the new line 2nd. I think you can then add data with personas knowing just the IDs of the fields of that second line. Record yourself doing that and see how the script looks.

If this works, there's no need to go looking for the first blank line. Which is fortunate because I don't think you can do that in Personas currently.

Steve.

Former Member
0 Kudos

I'll try that Steve - much appreciated.

Thanks.

Patrick.

Former Member
0 Kudos


Hi Steve,

I tried that but it doesn't seem to work, the recorder doesn't seem to pick up which button is being 'pressed'  .... any thoughts?

Also you will notice that I have cheekily added a second question… my
scrollable table is only showing two lines even though there is space to accommodate more
and I don’t have access to the parameters that seem to control this behaviour.

Any help or insights would be much appreciated.

Regards.

Patrick.

Former Member
0 Kudos


Hi,

The script recorder does actually pick up which buttons are pressed, try making the script editor window bigger... or click in the step and copy the value of the control ID and paste it in a text document, you'll see the full control ID specific to the button pressed.

Former Member
0 Kudos

Neil has already answered the first question. The IDs for the buttons are very long and just don't fit in the editor window. The recorder will have recorded them correctly, though. Click in the step, and the object ID field, and use the right arrow key to scroll to the end - you should see the two IDs eventually look different.

As for the second question, the number of lines in the table, remember than the backend ERP system doesn't know that Personas is being used here. It renders the table with a number of lines it thinks will fit, and Personas can't add more. You can use table caching to change that - with that turned on, Personas will grab all the lines of the table and then use as much screen space as is available. But that doesn't interact well with updating the table - it only really works cleanly for display. In your scenario, I think table caching will get in the way. That's probably not the answer you were hoping for, sorry.

Steve.

Former Member
0 Kudos

This is correct Neil in that the button does have a unique reference - thanks.BUT I still have a problem - the scriot overwrites the last line in the sales doc, it does not add a line onto the end.

When recording the script, the cursor falls into the first empty field of the next line. I can enter my data and save. The resulting script however overtypes the last existing line.

V. annoying.

Any thoughts much appreciated.

Regards.

Patrick

Former Member
0 Kudos

Once again many thinks Steve. I'm still struggling with this script - see my response to Neil above - so if you have any further thoughts I'd be keen to hear them.

On the second part, there seems to be a time lag between entering screen changes and personas being able to render it as newly defined. I was playing around with this last night and trying to get 4 lines to display rather than 2 ... as you can see from my screen shot, no matter how many times I had a go of re-sizing that box, it stubbornly displayed 2 lines.

When I took it up again today the system was showing 4 lines as expected? Seems as if it just needed to reset itself internally or something.

Regards.

Patrick

PS I’ve noticed it is quite slow to render some screens – are there particular changes that should be avoided as it causes performance problems?

Former Member
0 Kudos

Hi Steve,


The trouble is when you push that button ….

ses[0]/wnd[0]/usrUSRAREA/tabstripTAXI_TABSTRIP_OVERVIEW/tabpageSUBSCREEN_BODYSAPMV45A4400/subcntSUBSCREEN_TCSAPMV45A4900/subcntSUBSCREEN_BUTTONSSAPMV45A4050/btnBT_POAN

The script recorder, records a specific row on the line item grid, e.g. ses[0]/wnd[0]/usrUSRAREA/tabstripTAXI_TABSTRIP_OVERVIEW/tabpageSUBSCREEN_BODYSAPMV45A4400/subcntSUBSCREEN_TCSAPMV45A4900/tblSAPMV45ATCTRL_U_ERF_AUFTRAG/colTABLECOLUMN[1]/cell[14]

It needs to be a variable row (cell) reference, e.g. cell[x+1]; I guess your saying this is not possible at this time - yes?


Regards.

Patrick.

Former Member
0 Kudos

I see. Yes, that is what happens for me too. OK, let's try a different approach. Navigate to the "Item detail" tab and use the Create button there. That lets you fill in at least some of the details outside of the table, so you don't need to know which line number you're on. Note that you don't need to fill in the item number in this screen - leave it blank and SAP will fill it in for you.

Can you do everything you need from that screen?

As a last resort, you can easily find out from this screen the line number of the last existing item, and use that to calculate the table row references for the new row you add in the original "Sales" tab above. That's messy Javascript and best avoided, but it might work. I'd hope the above method would work for you, though.

Steve.

Former Member
0 Kudos

There's a performance guide for Personas that might help with some of these issues - Sap screen personas performance optimization guide v0.96.

I don't understand why the transaction would show only 2 lines one day and 4 the next. There is no screen size "memory" that would need to be reset. I'll have a play and see if I can figure out what's going on...

Steve.

Former Member
0 Kudos

Thanks again Steve - sterling support as always but I'm not sure I understand the response (although to be fair I've been playing around with this so much that I am starting to confuse myself )..

The Item Details tab on the main VA02 screen contains some details at the top of the tab as you say and the items table below. The Item number on the top part of the screen is filled in and greyed out even when you press the 'add line' icon.The system only lets you key information into the table view, not the overall tab view... did I miss the point of what you are saying?

Patrick.

PS. This particular dialogue is getting a bit convoluted but my questions around screen manipulations are mounting up. I'll create a new thread and try to concentrate on one topic at a time.

Former Member
0 Kudos

In the item detail tab, above the table, is a "create" button - . That's the button I'm talking about. Press that and see what happens

Steve.

Former Member
0 Kudos

Yes, it would be better to try and keep the discussions to one issue at a time. That makes them more useful to others. Most will just read the title and not realise there are multiple issues discussed in the replies...

Steve.

Former Member
0 Kudos

Excellent - blimey I'm learning things about standard SAP! I've never used that in the 15 years or so I've been using SAP .... how incurious of me.

Answers (0)