How to call BAPI in Extended Value Selector in Webdynpro for java
Hi all
i need to call a BAPI and populate the data in Extended Value Selector UI element.
can you please provide sample codes and required help.
Regards
Sunil
Hi,
Go through the following link
[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/391ee590-0201-0010-1c89-f1193a886421]
[Re: Creat organization tree in OVS]
and also you can search in SDN, there are lots of threads
Regards
Raghu
Similar Messages
-
How to Catch the Event when a Row is Selected in Extended value Selector
Hi All.
I Want to Call the Action when a perticular row is selected in Extended value Selector.
How can I do it
Thanks & Regards
KiranHi Kiran,
Create a seperate view with the table of records same u are showing EVS because with EVS it is not possible to raise any event.
So add ths view to a seperate window and open that window instead of EVS .So here you can raise an event becuse it a view.
Regards
Padma N -
Add columns to extended value selector
Hi All,
I have created an Extended value selector that has 2 columns(KEY column and VALUE column). How do I add columns to Extended Value Selector.
Thanks,
TomHI Tom,
->EVS just picks value from enumeration type which you must have created and displays those value.
->ONLY key and Value are the two columns possible. You cannot add any new columns to that.
->F4 help helps only to get values for a particular field which are already present somewhere ex may be some bapi or database.
->OVS is new version and you can look for that also if it suits you.
Thanx. -
RE:Extended Value Selector.
Hi All
I have taken a evs i.e Extended Value Selector. i have got the values in the evs at runtime and the code that i have used is
IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute("Status");
ISimpleTypeModifiable StatusType = attributeInfo.getModifiableSimpleType();
StatusType.setFieldLabel("Status");
IModifiableSimpleValueSet valueSet = StatusType.getSVServices().getModifiableSimpleValueSet();
valueSet.put("Key_0","New");
valueSet.put("Key_1","Open");
valueSet.put("Key_2","Assigned");
valueSet.put("Key_3","Closed");
wdContext.currentContextElement().setStatus("Key_0");
But i was unable to read the values i.e is selected in that evs can anybody tell how to read values from EVS.....Hi,
You can retrieve the selected value from the attribute mapped to UI. For example for dropDownByKey, from the property selectedKey.
USE:
wdContext.currentContextElement().getStatus();
It will return the key of the value selected.
thanks & regards,
Manoj -
How to call the form bean value on jsp withthe help of jstl tag
hi
all friends
i am working in struts & i use jstl tag in jsp. i have one problem rise is how to call the form bean value in jsp page by using jstl tag.
i now how to retrive the value through jsp:logic
eg. <logic:empty name="userListForm" property="users">
NO USER FOUND
</logic:empty>
see * userListForm mean formbaen name.
* users means collection object.
so how can i write above e.g in jstlYou use the jstl core:if or core:choose combined with the EL:
<c:if test="${empty users.userListForm}">
NO USERS FOUND
</c:if>I suggest you lookup the jsp expression language (EL) using google, it's very powerful. -
Hi
How to call BAPI FM's from RFC ??
thanks
kumarHi Palnati,
Use statement :
Call FUNCTION 'Bapi................'
DESTINATION Dest(RFC destination in TCODE SM59)
EXPORTING f1 =
f2 =
IMPORTING f3 =
TABLES T1 =
EXCEPTIONS .
Reward points if helpful.
Regards,
Hemant -
How to use BAPI in webdynpro for java application
Hi all,
Please help in getting started with calling a BAPI in a webdynpro for java application. I have got only the content needed to call a BAPI in a webdynpro for abap application but not in java. Kindly provide me some documents if possible.
Thanks in advanceHi ,
U have Created One Bapi u want to work with web Dyn pro for java Application Right .
U need the Following
1) NWDS (Netweaver Devloper Studio )
2) jdk1.4 or Above installed in your system .
After Installation of NWDS .
1) Just Take J2EE Enginee Details
a) Go to Window -> preferences -> J2ee Enginee - > give ur port number , Host name Details . and click finsh .
Go To Web Dyn Pro Perspective Click onj2EE engine .
Click On Refresh U will see Green Colour button .
Now ur Ready to import Ur BAPI .
1) Go to File -> New -> Project - > Web Dyn pro Project -.
Give Name , pkg Name Click On Finish .
2) Expand ur project hirarchy -> go TO Application -> Right Click -> Create Application - > Give Application name and Pkg name -> Click on Finish .
3) Now ur View And Controller Are Created by Default .
4) Go to Model-> Right Click on it-> Create Model -> Give Model Name & Pkg name Should diff from Application pkg the Click On Next
a) Here u have to Two JCo Destination Name Like Model Data And Meta data & R/3 System Details like System Number , Host name Etc -> then Click on next .
b) Here u will text filed where u want to search for ur Required BAPI . Type ur BAPI Name Click on Search . Ur bapi will be displyed In Down . click on Next .
c) Now Ur model is Importedint into NWDS .Map ur model data To Controller and Controller Element to View Elements .
After ur Model .
Go to -> Project Name -> Right Click -> go to -> Deploy New Archive .
after wards u have to go Apllication -> Right click -> deploy and Run .
ur output will be displyed thru Browser .
Thats it
Regards ,
venkat -
How to access(connect) BI Data in webdynpro for java applications
Hi ,
is there any way to access and display the BI data in portal using webdynpro for java applications like we did in Visual composer.
if not how to integrate the BI data in webdynpro applications ?
Regards,
GovinduHi,
Yes there are ways to do it. But may your scenario and the scenario for which I have done may differ.
You can use openhub to get the data in a flat file and then read it into weddynpro through a java service OR
You can use DBlink(which i have done).
Please refer the link below:
[Link|Data from BW to Oracle.;
This I have done in NW04s. Not sure whether a better solution is available in the newer release.
Hope it helps.
Regards,
Manoj -
How many softwares are there to create a setup file for java programs
Hi, i am new to java
I want to know how many softwares are there to create a setup file for java programs.
I know one software i.e java launcher to create a setup file.
I want to know about any other softwares are available to create a setup file for java programs.
I created a setup file for swings program in JCreator.
And don't think that i am wastiing ur time with this question .
Help me regarding this topic.
Thanks in Advancesuperstar wrote:
I want to know how many softwares are there to create a setup file for java programs.13, no wait, 42.
I know one software i.e java launcher to create a setup file.You should clearly identify what you think you already know.
I want to know about any other softwares are available to create a setup file for java programs.
I created a setup file for swings program in JCreator.Is this the one you talked before, or is this different?
And don't think that i am wasting ur time with this question .Why should I not think that? -
How to start to work on MDM JAVA API by using webdynpro for java
Hi all
I have basic idea on MDM business package thru portal by using standard iViews.
now i am planning to work on MDM JAVA APIs by using Webdynpro for Java as UI.
1) can you please share the required documents on the same. how to start working on this by using MDM JAVA APIs in webdynpro for java
2) what are the JARs files are required and how to integrate those jar files into webdynpro for java application.
3) is there any SDN help on MDM JAVA API with webdynpro for java? . can you please send the link on the same.
4) can you please help by providing sample code on how to use JAVA APIs for retrieving,deleting,inserting and Updating the data in the database.
if anybody helps on the same then it is the great help to me.
points are always rewardable...
Regards
Suresh babuHi Suresh,
You can have the MDM JAVA API javadocs from the link
http://help.sap.com/javadocs/MDM/SP06P2/index.html
There you can see a package named com.sap.mdm.examples.The classes in it contains some examples using which you can start understanding the code.
You need to have MDM JAR files for it. And these JAR files to be used at build time can be added to the project thru :-
Right click on project-> properties->Java Build Path - > Add external JARs
At run time you can add them the reference in
Right click on project-> properties->web dynpro references->library reference.
Thanks
Namrata -
How can I read cookies in WebDynPro for Java
Hi,
in WebDynPro for Java I found a possibility to to get a "request-object" like the standard "HttpServletRequest-object"
IWDProtocolAdapter protocolAdapter = WDProtocolAdapter.getProtocolAdapter();
IWDRequest request = protocolAdapter.getRequestObject();
debugEnabled = (request.getParameter("Debug") != null);
With this request-object I can read request-prameters but I couldn't find a possibility to get cookies from the request.
There is no method like the "getCookies().method" in the HTTPServletRequest-Interface:-((
Has anybody an idea, how I can read cookies in WebDynPro for Java ?
Regards
SteffenHi,
This is the latest update I could look for regarding cookies and webdynpro.
Panic - WebContextAdapter is depracted - no more cookies now?
Regards,
Harini S -
How to invoke Workflow and UWL through Webdynpro for Java
Hi,
In my Development Component there are three applications .The requirement is that the data will flow between one application to another only through workflow in
UWL.
Can anybody help me out as to how to invoke workflow programatically from Webdynpro for Java .
After data goes from one application to workflow UWL, how the second application will work on it . If possible please send me the links of some tutorials .
I searched in Webdynpro Tutorials site but there are no tutorials available there .
Thanks a lot .Hi,
Check the following Threads,U will get lot of details......
WebDynpro application that can work with SAP workflow work items?
/thread/142477 [original link is broken]
Configuring UWL with WebDynpro
/people/niharika.jeena/blog/2006/06/06/launching-webdynpro-from-universal-worklist
Sample Application,
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/how%20to%20configure%20the%20universal%20worklist.pdf -
How to read some images from file system with webdynpro for abap?
Hi,experts,
I want to finish webdynpro for abap program to read some photos from file system. I may make MIMES in the webdynpro component and create photos in the MIMES, but my boss doesn't agree with me using this way. He wish me read these photos from file system.
How to read some images from file system with webdynpro for abap?
Thanks a lot!Hello Tao,
The parameter
icm/HTTP/file_access_<xx>
may help you to access the pictures without any db-access.
The following two links may help you to understand the other possibilities as well.
The threads are covering BSP, but it should be useful for WebDynpro as well.
/people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents
http://help.sap.com/saphelp_sm40/helpdata/de/c4/87153a1a5b4c2de10000000a114084/content.htm
Best regards
Christian -
How to call BAPI from ABAP Inbound Proxy
Hi All
Can some one provide/giude a sample code on how to call a BAPI from generated Method (Inbound Proxy) and how are the table parameters passed from Proxy to BAPI.
Thanks
Ravi/Hello Ravi,
In the proxy before calling the BAPI, construct the table, fill it with the appropiate values by lopping over the proxy request object. Now use this table for calling BAPI
Cheers,
Naveen -
How to call BAPI in a ABAP prog
Hi All
I have a concern regarding the usuage of BAPI in the ABAP program.
i have successfully created a BAPI and i have implemented a method as well using ADD API Method button.
Now after doin all the things in SWO1.
I wanted to know how to call this BAPI method in se38.
CAn anyone throw some light on this ?
Regards
GauravHi,
try this
*& Report ZKAR_MATMAS_BAPI
*& This program demonstrates how easy it is to create Material master
*& data using BAPI_MATERIAL_SAVEDATA
*& The program also generates a report post-execution displaying errors
*& as well as successful uploads
REPORT ZKAR_MATMAS_BAPI.
* TABLES
* FLAGS *
DATA: F_STOP. " Flag used to stop processing
* DATA DECLARATIONS *
DATA : V_EMPTY TYPE I, " No. of empty records
V_TOTAL TYPE I. " Total no. of records.
* STRUCTURES & INTERNAL TABLES
*BAPI structures
DATA: BAPI_HEAD LIKE BAPIMATHEAD, " Header Segment with Control Information
BAPI_MAKT LIKE BAPI_MAKT, " Material Description
BAPI_MARA1 LIKE BAPI_MARA, " Client Data
BAPI_MARAX LIKE BAPI_MARAX, " Checkbox Structure for BAPI_MARA
BAPI_MARC1 LIKE BAPI_MARC, " Plant View
BAPI_MARCX LIKE BAPI_MARCX, " Checkbox Structure for BAPI_MARC
BAPI_MBEW1 LIKE BAPI_MBEW, " Accounting View
BAPI_MBEWX LIKE BAPI_MBEWX, " Checkbox Structure for BAPI_MBEW
BAPI_RETURN LIKE BAPIRET2. " Return Parameter
*--- Internal table to hold excel file data
DATA: IT_INTERN TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
*--- Internal table to hold Matetrial descriptions
DATA: BEGIN OF IT_MAKT OCCURS 100.
INCLUDE STRUCTURE BAPI_MAKT.
DATA: END OF IT_MAKT.
*--- Internal to hold the records in the text file
DATA : BEGIN OF IT_DATA OCCURS 100,
WERKS(4), " Plant
MTART(4), " Material type
MATNR(18), " Material number
MATKL(9) , " Material group
MBRSH(1), " Industry sector
MEINS(3), " Base unit of measure
GEWEI(3), " Weight Unit
SPART(2), " Division
EKGRP(3), " Purchasing group
VPRSV(1), " Price control indicator
STPRS(12), " Standard price
PEINH(3), " Price unit
SPRAS(2), " Language key
MAKTX(40), " Material description
END OF IT_DATA.
* SELECTION SCREEN. *
SELECTION-SCREEN BEGIN OF BLOCK SCR1 WITH FRAME TITLE TEXT-111.
PARAMETER : P_FILE TYPE RLGRAP-FILENAME OBLIGATORY DEFAULT " Input File
'C:\Material_master.XLS'.
PARAMETER : P_MAX(4) OBLIGATORY DEFAULT '100'. " no.of recs in a session
PARAMETERS: P_HEADER TYPE I DEFAULT 0. " Header Lines
PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
P_BEGROW TYPE I DEFAULT 1 NO-DISPLAY,
P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
SELECTION-SCREEN END OF BLOCK SCR1.
* AT SELECTION-SCREEN *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
*--- Validating file
PERFORM VALIDATE_FILE USING P_FILE.
* START-OF-SELECTION
START-OF-SELECTION.
*--- Perform to convert the Excel data into an internal table
PERFORM CONVERT_XLS_ITAB.
IF NOT IT_DATA[] IS INITIAL.
*--- Perform to delete Header lines
PERFORM DELETE_HEADER_EMPTY_RECS.
ENDIF.
* END OF SELECTION. *
END-OF-SELECTION.
*--- Perform to upload Material Master data
PERFORM UPLOAD_MATMAS.
* Form : validate_input_file
* Description : To provide F4 help for file if read from PC
FORM VALIDATE_FILE USING F_FILE TYPE RLGRAP-FILENAME.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
CHANGING
FILE_NAME = F_FILE
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE S010(ZLKPL_MSGCLASS). " 'Error in getting filename'.
ENDIF.
ENDFORM. " validate_input_file
*& Form CONVER_XLS_ITAB
* text
FORM CONVERT_XLS_ITAB.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = P_FILE
I_BEGIN_COL = P_BEGCOL
I_BEGIN_ROW = P_BEGROW
I_END_COL = P_ENDCOL
I_END_ROW = P_ENDROW
TABLES
INTERN = IT_INTERN.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*--- Perform to move the data into an internal data
PERFORM MOVE_DATA.
ENDFORM. " CONVERT_XLS_ITAB
*& Form MOVE_DATA
* text
FORM MOVE_DATA.
DATA : LV_INDEX TYPE I.
FIELD-SYMBOLS <FS>.
*--- Sorting the internal table
SORT IT_INTERN BY ROW COL.
CLEAR IT_INTERN.
LOOP AT IT_INTERN.
MOVE IT_INTERN-COL TO LV_INDEX.
*--- Assigning the each record to an internal table row
ASSIGN COMPONENT LV_INDEX OF STRUCTURE IT_DATA TO <FS>.
*--- Asigning the field value to a field symbol
MOVE IT_INTERN-VALUE TO <FS>.
AT END OF ROW.
APPEND IT_DATA.
CLEAR IT_DATA.
ENDAT.
ENDLOOP.
ENDFORM. " MOVE_DATA
*& Form DELETE_HEADER_EMPTY_RECS
* To delete the Header and empty records
FORM DELETE_HEADER_EMPTY_RECS.
DATA: LV_TABIX LIKE SY-TABIX.
IF NOT P_HEADER IS INITIAL.
LOOP AT IT_DATA.
IF P_HEADER > 0 AND NOT IT_DATA IS INITIAL.
DELETE IT_DATA FROM 1 TO P_HEADER.
* P_HEADER = 0.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
CLEAR IT_DATA.
*--- To delete the empty lines from internal table
LOOP AT IT_DATA.
LV_TABIX = SY-TABIX.
IF IT_DATA IS INITIAL.
V_EMPTY = V_EMPTY + 1.
DELETE IT_DATA INDEX LV_TABIX..
ENDIF.
ENDLOOP.
CLEAR IT_DATA.
*--- Total no of recs in file
DESCRIBE TABLE IT_DATA LINES V_TOTAL.
IF V_TOTAL = 0.
MESSAGE I013(ZLKPL_MSGCLASS). " No records in the file
F_STOP = 'X'.
STOP.
ENDIF.
ENDFORM. " DELETE_HEADER_EMPTY_RECS
*& Form UPLOAD_MATMAS
* to upload Material Master data
FORM UPLOAD_MATMAS .
LOOP AT IT_DATA.
* Header
UNPACK IT_DATA-MATNR TO IT_DATA-MATNR.
BAPI_HEAD-MATERIAL = IT_DATA-MATNR.
BAPI_HEAD-IND_SECTOR = IT_DATA-MBRSH.
BAPI_HEAD-MATL_TYPE = IT_DATA-MTART.
BAPI_HEAD-BASIC_VIEW = 'X'.
BAPI_HEAD-PURCHASE_VIEW = 'X'.
BAPI_HEAD-ACCOUNT_VIEW = 'X'.
* Material Description
REFRESH IT_MAKT.
IT_MAKT-LANGU = IT_DATA-SPRAS.
IT_MAKT-MATL_DESC = IT_DATA-MAKTX.
APPEND IT_MAKT.
* Client Data - Basic
BAPI_MARA1-MATL_GROUP = IT_DATA-MATKL.
BAPI_MARA1-BASE_UOM = IT_DATA-MEINS.
BAPI_MARA1-UNIT_OF_WT = IT_DATA-GEWEI.
BAPI_MARA1-DIVISION = IT_DATA-SPART.
BAPI_MARAX-MATL_GROUP = 'X'.
BAPI_MARAX-BASE_UOM = 'X'.
BAPI_MARAX-UNIT_OF_WT = 'X'.
BAPI_MARAX-DIVISION = 'X'.
* Plant - Purchasing
BAPI_MARC1-PLANT = IT_DATA-WERKS.
BAPI_MARC1-PUR_GROUP = IT_DATA-EKGRP.
BAPI_MARCX-PLANT = IT_DATA-WERKS.
BAPI_MARCX-PUR_GROUP = 'X'.
* Accounting
BAPI_MBEW1-VAL_AREA = IT_DATA-WERKS.
BAPI_MBEW1-PRICE_CTRL = IT_DATA-VPRSV.
BAPI_MBEW1-STD_PRICE = IT_DATA-STPRS.
BAPI_MBEW1-PRICE_UNIT = IT_DATA-PEINH.
BAPI_MBEWX-VAL_AREA = IT_DATA-WERKS.
BAPI_MBEWX-PRICE_CTRL = 'X'.
BAPI_MBEWX-STD_PRICE = 'X'.
BAPI_MBEWX-PRICE_UNIT = 'X'.
*--- BAPI to create material
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
HEADDATA = BAPI_HEAD
CLIENTDATA = BAPI_MARA1
CLIENTDATAX = BAPI_MARAX
PLANTDATA = BAPI_MARC1
PLANTDATAX = BAPI_MARCX
* FORECASTPARAMETERS =
* FORECASTPARAMETERSX =
* PLANNINGDATA =
* PLANNINGDATAX =
* STORAGELOCATIONDATA =
* STORAGELOCATIONDATAX =
* VALUATIONDATA = BAPI_MBEW1
* VALUATIONDATAX = BAPI_MBEWX
* WAREHOUSENUMBERDATA =
* WAREHOUSENUMBERDATAX =
* SALESDATA = BAPI_MVKE1
* SALESDATAX = BAPI_MVKEX
* STORAGETYPEDATA =
* STORAGETYPEDATAX =
IMPORTING
RETURN = BAPI_RETURN
TABLES
MATERIALDESCRIPTION = IT_MAKT
* UNITSOFMEASURE =
* UNITSOFMEASUREX =
* INTERNATIONALARTNOS =
* MATERIALLONGTEXT =
* TAXCLASSIFICATIONS =
* RETURNMESSAGES =
* PRTDATA =
* PRTDATAX =
* EXTENSIONIN =
* EXTENSIONINX =
IF BAPI_RETURN-TYPE = 'E'.
WRITE:/ 'Error:' ,BAPI_RETURN-MESSAGE ,'for material:' ,IT_DATA-MATNR.
ELSEIF BAPI_RETURN-TYPE = 'S'.
WRITE: 'Successfully created material' ,IT_DATA-MATNR.
ENDIF.
ENDLOOP.
ENDFORM. " UPLOAD_MATMAS
Regards,
V.Balaji
Reward if Usefull...
Maybe you are looking for
-
How can I install iPhoto on a 10.6.8 Macbook?
Hello all- I had a quick question regarding the newest version of iPhoto '11. Quite a while ago, I had to replace the hard drive of my (very old) Macbook Pro, and during this process I installed 10.6.8 on the new SSD. Everything works perfectly, bu
-
Error Message- Changed email passwords and now can't scan to email
Changed google email accounts and now wont scan to email, error message. How o I change or confirm passwords. It has also lost air print.
-
Number of frames in the cockpit-
Hellow everyone, I created 4 frames under a logic view in my cockpit, when presenting the cockpit 6 boxes of frames are presented ( 2 are empty ). Can I present only 4 frames under a logic view? Thanks
-
ITunes 8.0: no "create ringtone" option
Howdy, first posting, hope I'm not too much of an idiot, but: I've upgraded to iTunes 8.0. When I select a song that has a "bell" icon, if I click on it, it gives me the "help" menu about creating a ringtone...but it won't actually create a ringtone.
-
TRFC issue. Why does it happen?
dear all, would like to know why does T-RFC happen when loading data? i know how to fix it, but would like to know in dept why does it happen. thank in advance for any response given