Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

The Previous blog showcased how to Consume Standard SAP provided webservices in Visual Composer.This one demonstrates how to make use of BAPI'S as webservices and then Consume it in Visual Composer.The Blog also enlighten's the error that may be encountered while using the webservice in Visual Composer.Following are the Steps which needs to Performed:- ><server ID XXXXXX>->Services--->WebService Security.

    • Click on Create Button At the Bottom and Enter The name of the System.
    • Enter The WSDL URL , and Fill in the Login Credentials if the wsdl is authenticated.
    • Press Save button.





!https://weblogs.sdn.sap.com/weblogs/images/251750294/Visual_admin.JPG|height=306|alt=image|width=583...!------>


                           
                           

Fig 1. Showing the navigation structure in the Visual Administrator.

                                                         


                            >                           

Fig 2:Enter the Url,System details and login credentials.


Once the above steps have been performed we can see the name of the System appearning in the Visual Composer.We can also define Webservice system through visual composer but at times when the wsdl is authenticated Visual Composer throws and error.


Consuming a Webservice in Visual Composer :-

For a reference i am making use of the classical SAP BAPI FLIGHTGETLIST.

    1. Log on to VC and create model-->Iview.
    2. Check wether the system which you have created is appearing the "find data".
    3. Drag The webService on the screen as shown in the Figure 4.

    4. Define the web service(as shown in Figure 3) by choosing the input.
    5. Test the webService .



      Rationale behind testing the webservice is to Know whether the webservice is working fine or not.Once the webservice responds well and returns the desired ouput, Connect the input form and the output table as shown in the figure.

                           
                           
Fig 3 : Defining The webservice.


                           
                           
Fig 4 : When only Required Fields are Connected.


It is to be noted that once we depoly this iview and Enter the desired input it does not return anything .So we need to provide input to all the input fields(as shown in the figure 5) no matter we are using them or not , similarly we can make the form visibilty as False. once we deoply the iview ,enter the input we get an desired output as shown i figure 6.

Airline :- LH

ROWS :- 10

Sign:-'E'

Option:-'EQ'

(Sign and option i am passing as the prefilled value from the backend only in the visual composer).Thats why it is advisable to customize the bapi to avoid useless input ports.

                           
                           
Fig 5:- Showing The correct Approach.

                           
                           
Figure 6:- Desired Output.


Error that May be Encountered :-


If the webservice is draged inside a layer it will show the following error:-

                           
                           

Fig 7:- Error when Draged Directly into the Layer.


Solution is Drag the Webservice inside the dash Board , define it and then you can place the webservice inside the Layer.


Refrences :-



3 Comments
Labels in this area