cancel
Showing results for 
Search instead for 
Did you mean: 

Request data

Former Member
0 Kudos

Using BSP, I want to get the actual data posted into internal table.. How can I achieve that?

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Perhaps you should add some more details. Do you want to display the contents of an internal table in BSP (<htmlb:tableView element being the most likely approach), or are you actually talking about doing some sort of update.

Former Member
0 Kudos

Thomas, this is my scenario.. Through http post, somebody is dumping some data into the specified URL.. which invokes my BSP application.. When my BSP application is triggered, I want to be able to retrieve the data posted through http post and update my DB tables or write it to a file

Is this possible in first place? (no form fields defined in my BSP)

Former Member
0 Kudos

Hi,

You can try something like this:

Suppose you are passing two parameters var1, var2 from the url to the BSP page test.htm. In test.htm declare two page attributes var1 and var2 of same type as declared in the passing page. var1 and var2 in the test.htm page should be auto attributes. Now you can get the values of var1 and var2 in Onintialization event handler. Write the ABAP code to populate them to DB table with a row. Now your DB table gets updated. See this code.

row-material = var1.
row-quantity = var2.
modify ZNWR_TAB1 from row.

I hope this solves your problem.

Regards,

Ravikiran.

Former Member
0 Kudos

what if I am posting a rows (more like a stream of records)?

Former Member
0 Kudos

Hi,

The above mentioned same method can be used for rows also. Are you passing on these parameters from a BSP page or any other page?

Regards,

Ravikiran.

Former Member
0 Kudos

I have observed that BSP application gets triggered when we post something to the URL through Http post (from outside system , and not when we go to the URL). So I was wondering if there is a way I can capture that data in my BSP application and write it to DB table..

And I have no variables defined in my BSP page..

I am not sure i can retrieve the data from BSP, but I wanted to confirm that before discarding that option ..

SergioFerrari
Active Contributor
0 Kudos

Did you see my suggestion:

Maybe you need something like this:

DATA: ffs TYPE tihttpnvp, ff TYPE ihttpnvp.

request->get_form_fields( changing fields = ffs ).

LOOP AT ffs INTO ff.

endloop.

???

I think you can read every value of yours FORM fields with the method I'm suggesting.

Put into your DO_REQUEST and have a look to the table ffs

Former Member
0 Kudos

Thanx Sergio.. I thought this method is applicable only for form fields and so didn't try it initially.

Strange thing was my entire http post content got piped to one line.. Thanks a bunch..

Answers (1)

Answers (1)

SergioFerrari
Active Contributor
0 Kudos

Or do you need something like this:

DATA: ffs TYPE tihttpnvp, ff TYPE ihttpnvp.

request->get_form_fields( changing fields = ffs ).

LOOP AT ffs INTO ff.

endloop.

Try and debug...