Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with GET PARAMETER in "O4K_LICENSE" Transaction

Former Member
0 Kudos
221

Hi folks,

I am facing a problem with the usage of "GET PARAMETER ID" in the transaction O4K_LICENSE (IS-oil).

I have written a BDC which feeds in the License Type, External License type and a few other Mandatory fields to the Transaction, and on saving the transaction, SAP generates an "Internal License Number". This field has a Parameter ID "OIH", and I am using the command

GET PARAMETER ID 'OIH' FIELD lw_licin.

For the first pass of the loop, there is a value coming into lw_licin, but in the later loops this Value is not refreshing and the value which is coming into lw_licin is not changing. But the Database table OIHL is getting updated with the correct Internal License number values.

So, my question is, is there anyway by which i can refresh the SAP Global Memory after every loop pass?

Or, is there any way out to get the new generated values into lw_licin ?

Thanks in advance,

Vijay.

5 REPLIES 5

Former Member
0 Kudos
144

Hi,

I think that GET PARAMETER only reads the last value of the SAP memory, maybe i'm wrong..

If the database table OIHL gets updated why don't you select for the correct values?

0 Kudos
144

Hi Mireia,

I forgot to mention that i cannot fire a Select query because the table OIHL has a Composite Primary key with the fields as the Internal License Number and the External License Number, and moreover, i have to save the internal number generated then and there itself because it is attached to a record number which iam generating in the program. So, the Select query is ruled out.

Any ways, thanks for reminding me about this, and also for the prompt reply.

Warm Regards,

Vijay

Former Member
0 Kudos
144

I don't think if it's the transaction to manage the loop.

If there's a user-exit you could have some chances.

Max

0 Kudos
144

Hi max,

Infact, there seems to be a problem with the transaction itself if iam not wrong. Whenever i open the transaction "O4K_LICENSE", it shows the last generated value of the Internal License Number. So, i tried changing the BDC by clearing the field, but it was of no use.

0 Kudos
144

Hi

If you clear the parameter, you should transfer a blank value to it:

DATA: NO_VALUE.

SET PARAMETER ID <ID> FIELD NO_VALUE.

Now the problem is this statament should be into loop and i think the transaction only does the GET PARAMETER.

If transaction doesn't do the SET PARAMETER yuo can do anything.

In your standard program there should be something like:

LOOP...

IF SY-TABIX > 1.

SET PARAMETER ID <ID> FIELD NO_VALUE.

ENDIF.

.......

ENDLOOP.

but I think it's very hard there is a piece of code like that, and you can do nothing, because you can only set the parameter before calling the transaction (in bdc mode) and after calling the transaction but not while the transaction is working.

You should change the standard program to do this.

Max

Message was edited by: max bianchi