Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[HELP]Button no longer works in the transaction ME21N(SAP/QTP)
#5
Solved: 11 Years, 4 Months, 3 Weeks ago
   

I need select the menu item marked in red.
When I select this item, it displays a screen where I fill the purchase requisition number and click on the Execute button.

So, I create a purchase order based on the purchase requisition.

object is marked in blue:

Code:
"Class Name: = SAPGuiToolbar"
"abs_x: = 17"
"abs_y: = 236"
"enabled: = True"
"guicomponenttype: = 202"
"height: = 24"
"id = / app / con \ [0 \] / ses \ [0 \] / wnd \ [0 \] / shellcont / shell / shellcont \ [1 \] / shell \ [0 \]"
"name: = shell \ [0 \]"
"type: = GuiShell"
"width: = 367"
"x: = 0"
"y: = 0"


"Class Name: = SAPGuiToolbar"
"abs_x: = 17"
"abs_y: = 236"
"enabled: = True"
"guicomponenttype: = 202"
"height: = 24"
"id = / app / con \ [0 \] / ses \ [0 \] / wnd \ [0 \] / shellcont / shell / shellcont \ [1 \] / shell \ [0 \]"
"name: = shell \ [0 \]"
"type: = GuiShell"
"width: = 367"
"x: = 0"
"y: = 0"


Code:
Code:
If SAPGuiSession("Session").Exist(2) Then
Reporter.ReportEvent micPass, "Session", "Tela Session exibe com Sucesso"
With SAPGuiSession("Session")
.Reset "ME21N"
If  .SAPGuiWindow("Criar pedido").Exist(2) Then
Reporter.ReportEvent micPass, "Criar pedido", "Tela Criar pedido exibe com Sucesso"
If .SAPGuiWindow("Criar pedido").SAPGuiButton("Ativar síntese de documentos").Exist(2) Then
.SAPGuiWindow("Criar pedido").SAPGuiButton("Ativar síntese de documentos").Click
End If
Expandir
.SAPGuiWindow("Criar pedido").SAPGuiToolbar("ToolBarControl").PressContextButton "SELECT"
.SAPGuiWindow("Criar pedido").SAPGuiToolbar("ToolBarControl").SelectMenuItem "Requisições de compra"
.SAPGuiWindow("Requisições de compra").SAPGuiEdit("Nº requisição de compra").Set reqCompra
.SAPGuiWindow("Requisições de compra").SAPGuiEdit("Nº requisição de compra").SetFocus
.SAPGuiWindow("Requisições de compra").SendKey ENTER
.SAPGuiWindow("Requisições de compra").SAPGuiButton("Executar  (F8)").Click
.
.
.
Reply


Messages In This Thread
RE: [HELP]Button no longer works in the transaction ME21N(SAP/QTP) - by rafaponzio - 06-25-2012, 08:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Not able to click the save button in Save As window while downloading from SAP kathirvelnagaraj 0 2,479 08-25-2015, 07:37 PM
Last Post: kathirvelnagaraj
  QTP not clicking on the flex button sudheerch 2 3,666 12-03-2013, 12:56 PM
Last Post: sudheerch
  Same code on running with UFT11.5 gets slow and browser hangs but works fine inQTP11 Rashi 1 2,572 03-02-2013, 04:12 PM
Last Post: vinod123
  Function written in Func library is not returning values but works in same script Shwethareddy 5 4,732 02-25-2013, 10:55 AM
Last Post: vinod123
Question <Interesting> Is it possible to execute SAP GUI application without QTP Jyobtech 3 3,690 09-07-2012, 12:26 PM
Last Post: SIBICA

Forum Jump:


Users browsing this thread: 6 Guest(s)