Solved

I want to pull Doc Text and fill it into Excel according to the row that Loop comes from.

  • 13 February 2024
  • 7 replies
  • 77 views

Userlevel 1
Badge +4

 I want to pull Doc Text and fill it into Excel according to the row that Loop comes from. I don't know which command to use. I would like to disturb you too. 

 

icon

Best answer by Zaid Chougle 13 February 2024, 12:13

View original

7 replies

Userlevel 4
Badge +14

Hi @mewky ,

Correct me if I am wrong, you are looping an input Excel file and row by row entering data into the SAP and basis that you want to extract the Document number and for that row you want to set the Document number, right?

So what you can do is before the loop starts you can go to the column where you want to set the Document Number and row should be 2

( Example: Generated Doc Number, column is at H

So Activate H2 before going into the loop )

After performing all the actions, at the end you can set cell --> Active cell --> $sDocumentNumber$.

If any error comes while filling that entry, you can also write the error using TryCatch Block on that same row.

 

Second approach is you can create a counter Variable initialised to 2, then you can use that to set the Document Number basis on above logic.

 

Let me know if you want any further help.

Userlevel 1
Badge +4

I'm sorry I don't understand what you're talking about. Previously, I was able to enter the details until the document number 18000+++ was output. I couldn't find a way to pull this number out and put it in Excel in the row I pulled it in to fill in. I tried to do it That will bring the numbers back to the end of the table.

 

 

Userlevel 4
Badge +14

As you are using SAP, are you using SAP actions or recorder to automate the process.

If you are using recorder than it might not be able to extract, depends.

If you are using SAP actions, then please extract the path using SAP recorder and then use get value/ text using that path and set in the Excel.

Userlevel 1
Badge +1

I would use “SAP: Get text” action to read the status bar message. The field path parameter would be wnd[0]/sbar.

Then you can use String operations to extract just the doc number from the output of the Get text.

Userlevel 4
Badge +14

I would use “SAP: Get text” action to read the status bar message. The field path parameter would be wnd[0]/sbar.

Then you can use String operations to extract just the doc number from the output of the Get text.

Yes, @mewky this will work.

But before that you need to check whether you are using SAP actions or not.

Userlevel 1
Badge +4

Zaid Chougle

When Get Text comes out, what action do I need to use to bring the data there into the original Excel source by appending that column?

Badge

Hello There,

 

I have the same problem.

When Get Text comes out, what action do I need to use to bring the data there into the original Excel source by appending that column?

 

Reply