Skip to Content

Summary:

Passing Inspection Lot No from Portal to the QE51N Tcode.

Symptom:

As soon as access to the QE51N transaction will load the Material Tab. As we are trying to pass Variable (Inspection Lot) from portal which is available in another tab Portal can not find the required value to push to the QE51N.

Reason and Prerequisites:

From portal we can pass the variables which are available after immediate load of the transaction. In this perspective we can manipulate the QE51N transaction from portal control.

To achieve this we need to perform below steps. For the same required to create screen variant for QE51N Tcode to load Inspection Lot Tab as default.

Need full access toe QE51N transition to create a screen variant.

Solution: Steps to Implement the solution:

Standard Screen of QE51N in ECC

11-5-2013 2-56-23 PM.jpg

Calling QE51N web gui transaction before we implement these steps. As portal could not find the inspection Lot filed this transaction will not execute hence will give blanks screen even if we pass value from portal.

In our case we are passing value from Portal POWL application. Same case application if pass values from any portal applications.

11-5-2013 2-57-26 PM.jpg

When calling standard QE51n from Portal the Inspection Lot Number tab should be appear by default.

11-5-2013 2-58-41 PM.jpg

Now navigate to QE51N and click on Inspection Lot Number Tab –> Save

To avoid standard variant(SAP&TCODE_QE51N) modify the Variant as below.

Enter Variant Name, Description and Unchecked all screen assignments except Inspection Lot screen Number. Here Inspection Lot Screen no is 0510.

Now here important point to be noted, The name of the variant should be always starts with “SAP_” or “SAP&”. Id we user SAP/User Variant we can not transport this Variant to another landscapes. We should implement this variant manually in each layers as part of Cut over activity.

If we want to transport these variant we need to maintain the variant name starts with “Cust_” or “Cust&” only. As we all know to manage name with out Z/Y we should need SAP Access Key.

If we create variant with user variant like with “U_” this should in user perspective.

These all variant naming conditions logic has maintained in the Program “SAPLQEES” which we can see it from Inspection lot Number tab (F1 –> Technical Name). To navigate to this logic: SE38 – SAPLQEES – INCLUDE lqeesf01 – PERFORM VARIANT_START_F10.

Code Snippet as below:

IF syslset IS INITIAL AND sycalld IS INITIAL AND
sy
tcode <> ‘SE38’ AND sytcode <> ‘SA38’.
*
h_repid
= syrepid.
CLEAR h_variant.
h_variant
= ‘U_’.
WRITE syuname TO h_variant+2.
*   User Variant U_<username>
CALL FUNCTION ‘RS_VARIANT_EXISTS’
EXPORTING
report  = h_repid
variant
= h_variant
IMPORTING
r_c    
= h_subrc.
IF h_subrc <> 0.
CLEAR h_variant.
h_variant
= ‘CUS&TCODE_’.
WRITE sytcode TO h_variant+10.
*     Customer variant CUS&TCODE_<sy-tcode>
CALL FUNCTION ‘RS_VARIANT_EXISTS’
EXPORTING
report  = h_repid
variant
= h_variant
IMPORTING
r_c    
= h_subrc.
ENDIF.
IF h_subrc <> 0.
CLEAR h_variant.
h_variant
= ‘CUS&’.
WRITE sytcode TO h_variant+5.
*     Customer variant CUS&<sy-tcode>
CALL FUNCTION ‘RS_VARIANT_EXISTS’
EXPORTING
report  = h_repid
variant
= h_variant
IMPORTING
r_c    
= h_subrc.
ENDIF.
IF h_subrc <> 0.
CLEAR h_variant.
h_variant
= ‘SAP_TCODE_’.
WRITE sytcode TO h_variant+10.
*       SAP variant SAP_TCODE_<sy-tcode>
CALL FUNCTION ‘RS_VARIANT_EXISTS’
EXPORTING
report  = h_repid
variant
= h_variant
IMPORTING
r_c    
= h_subrc.
ENDIF.
IF h_subrc <> 0.
CLEAR h_variant.
h_variant
= ‘SAP&TCODE_’.
WRITE sytcode TO h_variant+10.
*       SAP variant SAP&TCODE_<sy-tcode>
CALL FUNCTION ‘RS_VARIANT_EXISTS’
EXPORTING
report  = h_repid
variant
= h_variant
IMPORTING
r_c    
= h_subrc.
ENDIF.

11-5-2013 2-58-55 PM.jpg


Here I have given Variant Name as SAP_TCODE_QE51 (Variant Name should starts with SAP_).  Uncheck all screens except 0510 under Screen Assignments.

And Save.

11-5-2013 2-59-17 PM.jpg

Restart GUI

11-5-2013 2-59-30 PM.jpg

Test QE51N Again now always this transaction will loads Inspection Lot Number tab by default. Should be looks as below

11-5-2013 2-59-57 PM.jpg

Testing from Portal – Login Portal – Navigate to Application where you want to pass this inspection Lot no.

Should be able to launch executed QE51n web gui transaction which is relevant to the selected value from portal screen.

11-5-2013 3-01-22 PM.jpg

HAPPY SHARING!

Venky

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply