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: 

FM for SELECT a entry and restrict for any changes

Former Member
0 Kudos

Hi,

We require your help to SELECT a entry and restrict for any changes.

The scenario is as follows

This is on SAP BPS and it is on planning tool which is viewed in portal. The backend is BSP applications.

As below there are 3 entries where Status has D(Draft) and F(Final) as values in the object/table which is viwed in the portal

Status     City     Country      Amount

D             XX          JJ              10

D             YY         PP             20

D             NN         QQ            30

The key figures are editable and characteristics are greyed out and not editable/not saved when it is edited.

We want to say change the characteristic value of Second line in the above from D to F and Save it.

As we do not have the option to save characteristics value, we had built used the functionality called REPOST. A button was created using Web interface builder in the portal and parameter is set as D to F in the BPS area. This works fine but the problem is when I want to change only the second line when I select the entry and hit repost button- ALL THE ENTRIES CHANGE from D to F.

There is an option in the BPS are where a exit function /FM can be inserted and button can be brought in the portal.

We require your help for FM/code to SELECT a entry and restrict for accessing the REPOST function.

Thanking you in advance.

Regards

Jerry

5 REPLIES 5

former_member186491
Contributor
0 Kudos

Hi Jerry,

There should be Qualifier be used, like, in your case, combination of Fields should also be compared before updation. Because, matching one field is leading the updation of all records in this scenario.

Based on combination-match, you need to read the Index and UPDATE Value by Index only.

N.B. : Please declare one Local Variable to store SY-TABIX value as Index and avoid direct use of SY-TABIX. This is because SY-TABIX - being the System Variable - stores dynamic value at runtime and gets changed.

Hope this way you can control the process of Updation as per your Business-Logic.

Thanks.

Kumar Saurav.

0 Kudos

Dear Kumar,

Can you please be more explanatory using steps as I am not a ABAP expert.

Thanking you in advance,

Regards

Jerry

former_member213851
Active Contributor
0 Kudos

Hi Jerry,

Yo need to use MODIFY stmt with SY-TABIX  exactly after the READ stmt / below logic where the characteristic value of the second Record in table is updated .

Also you need to pass the Characteristic value field name in the Modify stmt under TRAMSPORTING.

in order to changethe Desired record status .

Regards,

Sachin

0 Kudos

Dear Sachin,

Can you please explain where these statements need to be inserted.


Thanking you in advance.


Regards

Jerry

0 Kudos

Hi Jerry,

Yo need to use MODIFY stmt with SY-TABIX  exactly after the READ stmt or below logic where the characteristic value of the second Record in table is updated .

This was given in my earlier reply also.