‎2009 Dec 13 6:14 PM
Here's a challenging one for anyone up to it.
I am trying to add multiple identification rows to business partners.
It's easy to duplicate:
In transaction BP create a Person or Organization Business Partner (General). You don't need to enter any data.
On the "Identification" tab, in the "Identification Numbers" box enter a row. For example:
CRM001 1
CRM001 2
CRM001 3
CRM001 4
CRM001 5
CRM001 6
CRM001 7
CRM001 8
CRM001 9
This is all well and good if I record each row. Of course I don't know the data or number of rows before so I have to create a loop around one insert. I can loop and add rows, the problem is that after 4 rows I can't get it to enter a new row; it just keeps overwriting the last row. I have tried recording page downs, enters. I have tried parameterizing the row ID in the script (<!V_ROWNUM!>) and looping on that; it works for the first rows but after that just keeps overwriting. This is a different type of table than I have been able to add rows before; it doesn't have an insert row button. I have spent three full days trying everything I can think of. Can anybody help? Thank you.
David
P.S. I am not an ABAP'er so prefer not to use ABAP...ENDABAP if possible. I'd like to be able to use the technique in the future without trying to get a programmer's time (which is not possible).
‎2009 Dec 16 11:25 AM
Hi david,
Do a mod 4 on loop counter count and after every 0 ( 1 mod 4, 2 mod 4, 3 mod 4, 4 mod 4).
4 mod 4 is 0 , here please record a page down , you can see 3 rows get moved.
Now problem is i dont have last row for mod 4.
So for every count of multiple of 3 do a page down .
it should work.
best regards
vinay
Note - use ABAP ENDABAP for MOD , ecatt does not support MOD.
‎2009 Dec 22 12:07 AM
Hi Vinay,
Thanks for your suggestion; I haven't forgotten. I'm going to spend some time over Christmas vacation with an ABAP book and try out your suggestion. I'll let you know how it goes, thanks again.
David
‎2009 Dec 23 2:41 PM
Hello David,
As far as i see it should work. Usually recordings are performed to add one row into the table and the looping is performed based on the number of entries passed to enter into the table.
Using GETLEN find the number of entries passed , get this value into the local variable and loop the recording of entrieing the value into the table some many times.
As you are saying the entry is getting overwritten, this is due to not change in the ID. probably you can paste your coding in the word docuement .
We can have a look at it. I have worked rigrously adding multiple rows and till now it works as expected.
Merry Christmas.
Thanks & Best regards,
Ajay
‎2009 Dec 23 2:39 PM
Hello David,
As far as i see it should work. Usually recordings are performed to add one row into the table and the looping is performed based on the number of entries passed to enter into the table.
Using GETLEN find the number of entries passed , get this value into the local variable and loop the recording of entrieing the value into the table some many times.
As you are saying the entry is getting overwritten, this is due to not change in the ID. probably you can paste your coding in the word docuement .
We can have a look at it. I have worked rigrously adding multiple rows and till now it works as expected.
Merry Christmas.
Thanks & Best regards,
Ajay
‎2009 Dec 23 9:57 PM
Hi David,
my suggestion is as follows:
...
session.findById("wnd[0]/usr/subSCREEN_3000_RESIZING_AREA:SAPLBUS_LOCATOR:2036/subSCREEN_1010_RIGHT_AREA:SAPLBUPA_DIALOG_JOEL:1000/ssubSCREEN_1000_WORKAREA_AREA:SAPLBUPA_DIALOG_JOEL:1100/ssubSCREEN_1100_MAIN_AREA:SAPLBUPA_DIALOG_JOEL:1101/tabsGS_SCREEN_1100_TABSTRIP/tabpSCREEN_1100_TAB_03/ssubSCREEN_1100_TABSTRIP_AREA:SAPLBUSS:0028/ssubGENSUB:SAPLBUSS:7014/subA06P02:SAPLBUD0:1520/tblSAPLBUD0TCTRL_BUT0ID/ctxtGT_BUT0ID-TYPE[0,0]").text = "CRM0001"
session.findById("wnd[0]/usr/subSCREEN_3000_RESIZING_AREA:SAPLBUS_LOCATOR:2036/subSCREEN_1010_RIGHT_AREA:SAPLBUPA_DIALOG_JOEL:1000/ssubSCREEN_1000_WORKAREA_AREA:SAPLBUPA_DIALOG_JOEL:1100/ssubSCREEN_1100_MAIN_AREA:SAPLBUPA_DIALOG_JOEL:1101/tabsGS_SCREEN_1100_TABSTRIP/tabpSCREEN_1100_TAB_03/ssubSCREEN_1100_TABSTRIP_AREA:SAPLBUSS:0028/ssubGENSUB:SAPLBUSS:7014/subA06P02:SAPLBUD0:1520/tblSAPLBUD0TCTRL_BUT0ID/txtGT_BUT0ID-IDNUMBER[2,0]").text = "1"
session.findById("wnd[0]/usr/subSCREEN_3000_RESIZING_AREA:SAPLBUS_LOCATOR:2036/subSCREEN_1010_RIGHT_AREA:SAPLBUPA_DIALOG_JOEL:1000/ssubSCREEN_1000_WORKAREA_AREA:SAPLBUPA_DIALOG_JOEL:1100/ssubSCREEN_1100_MAIN_AREA:SAPLBUPA_DIALOG_JOEL:1101/tabsGS_SCREEN_1100_TABSTRIP/tabpSCREEN_1100_TAB_03/ssubSCREEN_1100_TABSTRIP_AREA:SAPLBUSS:0028/ssubGENSUB:SAPLBUSS:7014/subA06P02:SAPLBUD0:1520/tblSAPLBUD0TCTRL_BUT0ID").verticalScrollbar.position = 1
...
The mouse click on the next line allows the use of always the same relative coordinates for the new parameters.
Merry Christmas,
ScriptMan
Edited by: ScriptMan on Dec 23, 2009 10:58 PM
‎2010 Feb 01 7:31 PM
Hi,
I may suggest a workaround, you can always call a Bapi wrapper ( or a Function module ) which is exposed by SAP and try to pass multiple rows , rather than trying to input throught GUI .
for example there will be some BAPI Wrapper or Function module exposed by name PARTNER_CHANGE.
Hope it will help to sovle ur issue to some extent .
regards
harsha
‎2010 Feb 24 4:19 AM