Application Development and Automation 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: 
Read only

blocked orders

Former Member
0 Likes
796

Hi,

Using the double-click functonality the user will get to the order details and the order has to be blocked for other users.i am using alv grid display.pls can any one help me regarding this.

thanks and regards,

srinivas

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
757

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = W_REPID

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

.

..

FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM

P_SELFLD TYPE SLIS_SELFIELD.

case p_ucomm.

when '<Code for double click>'.

set parameter 'AUN' field <value of the order>.

call transaction 'VA02' AND SKIP FIRST SCREEN.

endcase.

ENDFORM.

5 REPLIES 5
Read only

Former Member
0 Likes
758

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = W_REPID

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

.

..

FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM

P_SELFLD TYPE SLIS_SELFIELD.

case p_ucomm.

when '<Code for double click>'.

set parameter 'AUN' field <value of the order>.

call transaction 'VA02' AND SKIP FIRST SCREEN.

endcase.

ENDFORM.

Read only

0 Likes
757

HI,

Thanks for the suggestion.but after going to va02 , what to do?how can i check whether it is blocked by any other user or not? pls suggest?

Read only

andreas_mann3
Active Contributor
0 Likes
757

Hi,

so use fm ENQUEUE_E_TABLE

and integrate sample in your event double-click:

 sptab-tabname = 'ZORDER'.
  concatebate sy-mandt zorder-ordid into sptab-varkey.
*
  CALL FUNCTION 'ENQUEUE_E_TABLE'
       EXPORTING
            tabname        = sptab-tabname
            varkey         = sptab-varkey
       EXCEPTIONS
            foreign_lock   = 1
            system_failure = 2
            OTHERS         = 3.
*
  IF sy-subrc <> 0.
    MESSAGE e001(00) WITH 'ZORDER'.
  ENDIF.

A.

Read only

Former Member
0 Likes
757

Hi Srinivas,

You can query the user name using Sy-Uname if only one user is going to use it & if it matches then you can allow him to see the order details or not.

E.g. IF sy-uname EQ 'XYZ'.

''Go to order details.

ENDIF.

Second option is to ask your basis guys to build an authorization object for transaction to view order details.

Check for authorization before displaying the detials. If SY-SUBRC value is 0,then let the user view details. Else block him.

Regards,

Chetan.

PS:Reward points if this is helpful.

Read only

Former Member
0 Likes
757

Hi folks,

i am having a sap gui problem. we are working on HP-Unix platform which is a clients system at offshore india.we are not able to working with screen painter or any of the sap gui. we have dowloaded all the latest patches and currently we have installed patch 22.but still it is not working. but the onsite people who are working on the same platform were able to access the screen painter ie everything of sap gui.but we are unable to have it...after several attempts of installing sap and gui both.....

NOTE: offshore team and onsite team was working on windows .surprisingly offshore was able to get the sapgui , working fine on demo system. ie on IDES.

it would be great for me, if anyone from sdn forum can help me regarding this matter.

thanks

sri