web service for a (RFC)FM


Craete a function module and use it as a web service.

In this example we have created a web service for a  (RFC)FM .

Step 1.Go -->se 37 -->create a (RFC) function module

Import parameter
Export parameter




Code for the function module

DATA :  L_T_0105 TYPE  STANDARD TABLE OF P0105,
          WA_0105  
TYPE  P0105.

  
CALL FUNCTION 'HR_READ_SUBTYPE'
       
EXPORTING
*    TCLAS                 = 'A'
         PERNR                 
PERNR
         INFTY                 
'0105'
         SUBTY                 
'0001'
*    SPRPS                 = '*'
        BEGDA                 
SY-DATUM
        ENDDA                 
SY-DATUM
       
TABLES
         INFTY_TAB            
=  L_T_0105[]
      
EXCEPTIONS
        INFTY_NOT_FOUND       
1
        INVALID_INPUT         
2
        
OTHERS                3
               .
  
IF SY-SUBRC <> 0.


  
ENDIF.
  
SORT L_T_0105 BY ENDDA DESCENDING.
  
READ TABLE L_T_0105 INTO WA_0105 INDEX 1.
  
IF SY-SUBRC 0 .
    
WRITE WA_0105-USRID TO  E_NAME.
    
CLEAR WA_0105.
  
ENDIF.







Save it to local
l

Now go to the tcode soamanager the below screen will appear in web browser
Go to the single service administration


We will get the list of web services now choose zTest_webservice (motioned while creating the web services)

This will open WSDL save as XML



Now go to the click display binding WSDL URL


Example: http://:8000/sap/bc/srt/wsdl/bndg_E13C4BD379AE8AF1BF850026554B371E/wsdl11/
allinone/ws_policy/document?sap-client=011

Go the EP portal and run the web services using above link
Protected by Copyscape Web Copyright Checker

























Variants for report programs






A Report program can be executed in background in two ways:

Method 1:  First create a variant for the report.
                 Then Go to SE38-->Program-->Execute-->Background.
Method 2:  Go to sm36
                  Specify job name and Job class--> Step tab in the application tool bar
                  Specify program name
                  Specify variant
--> Save it-->Save the job-->
                 Will get a message saying ' job has been scheduled'.
                 Go to tcode -->sm37-->check scheduled checkbox-->Execute.


Protected by Copyscape Web Copyright Checker

Create a variant for Transaction code


The Transaction code variant is used to organize the initial Screens of SAP transactions, and is user specific. These types of variants can be used to pre-populate field(s) each and every time that particular transaction is accessed.

Example:
    A variant can be created for any transaction.
    As an example I have chosen IW38 (Change PM Orders) transaction.
  1. In the initial screen of the transaction, populate the search fields that you desire to be pre-populated.
  2. Click on the save button   
  3. Enter the Variant name and Description.
  4. Check the check boxes under ‘Required fields’ column for all the fields that  

            have to be pre-populated.
      Click on the save button     .

  1. Click on the variants button(



Creating a variant using Selection variables
Variants can also be set up to hide field(s), make field as ‘required’  
well as lock in parameters into the fields that should not be changed. Fields that
are dynamic, such as date field, can also be set up so that a certain parameter
defaults or can be pre-populated based on requirement. These types of fields
are known as ‘Selection Variables’.

In this example , a variant will be created such that the ‘Valid From' date will
default to the current date.
  1. Open transaction IH01 (Functional Location structure display).
  2. While saving  select the variant name i.e. CURRENT DATE
  3. Click on the Save button      .




Protected by Copyscape Web Copyright Checker

Create a Layout Variant



A Layout variant can be used to pull in additional information into a list display and organize the information to a User’s specifications. This type of variant is again User specific. Layout variants can be created for any Transaction.

In this example, A Layout variant is created for transaction IW28( Change
Notification).

A Layout variant can be used to pull in additional information into a list display and organize the information to a User’s specifications. This type of variant is again User specific. Layout variants can be created for any Transaction.

In this example, A Layout variant is created for transaction IW28(Change
Notification).
On the initial screen, enter in the desired search criteria.
In this example I am entering the ‘Notification date range’ with ‘notification status’ as Outstanding and Completed.
1.  Click on the execute button      .
         On the initial screen, enter in the desired search criteria.
   In this example I am entering the ‘Notification date range’ with ‘notification
   status’ as Outstanding and Completed.
2.  Click on the execute button.

List of tables to store Variants:

TVARV --> for storing the variants (TVARVC- client specific)VARID --> Variant directoryVARIT --> Variant texts
             
Transaction and screen variants
Transaction variant
  • Transaction variant is a used to create some tailored version of standard SAP transaction without any actual modification i.e a standard transaction can be modified as per the requirement.
  • It can be used to hide fields, menu functions, screens, to supply individual fields with default values or to change the ready for input status of one or more fields.    
Transaction variant can be created in two steps:
      1) Create a Transaction variant in SHD0
      2) Attach the transaction variant to a transaction




Protected by Copyscape Web Copyright Checker

/*Newer Posts*/ Older Posts Home