UML notation: Class operation return value multiplicity

Hallo,
how would you write function from example below using UML notation on implementation level, please:
class Coin {
  public String[] getSideNames() {
    return new String{ "Odd", "Even" };
}Multiplicity in return value is troubling me. I've tried +getSideNames( ) : String [ 2 ] but my tool just created new class named "String[2]" :-( To be precise I know that return value of function is array of MyClass with one or more element (1..*) so created class name was "MyClass[1..*]" -- nasty name to pass to javac isn't it? :-)
Is is possible to write multiplicity of return value this way? I couldn't find anything in omg's "UML: supertructure document" :-( I am not telling that it's not written there :-)))
Thank You.

jschell>
Unfortunately [n] behaves in same fashion as [*] =>
creating class named MyClass[1..n]" :-(
duffymo> what's the point?
this was only sample, real application is far more
complex than that. Even "nature" of result was just
made up. How am I or anyone else who responds supposed to know that?
>
duffymo> you can have cardinality in a class diagram
that shows exactly two values are available.
yup, i ended like that but there's still problem coz
return value class is "Object[]" :-(Sounds like a bad design, but I haven't seen the code, so I can't tell.
duffymo> personally, i don't think that exposing the
side names as ...
"side names" were just example :-) IMHO there are
certain situations where one could say "screw the
abstraction" :-D E.g. for final classes from one
package that cooperate on single time critical task.
:)"screw the abstraction" - good luck as an object-oriented designer with that attitude.
Either you're doing real-time work where time really is critical, or you're just another yutz who is congratulating himself on recognizing a time critical task without doing profiling or getting any real data. (A common mistake.) The maintainence and development time might be more critical here.
Gotta admit that I'm not much interested in commenting on your poor approximation of the real problem.
%

Similar Messages

  • SUP HWC Operation Return Values

    Hello SCN,
    I am having a problem with a Client Initiated HWC application.
    The application has 1 MBO which has an Operation attached to it.
    The MBO queries SAP and return the details of a Purchase Requisition using the SAP standard BAPI.
    Once the user has viewed the details of the PR he can then click a button to take him to the Operation which is a SAP standard Release BAPI.
    When I created the operation I selected 2 input values (PR Number and Release Code) and then an output table which returns the message.
    When building the HWC application I am unsure of how to display the table that is returned after the release of the PR or on failing of the release.
    Using an operation can one have an output?
    Thank you
    Jared Commerford

    Hi Jared,
    Instead of attaching the operation
    into the MBO, you can create another MBO for operation using the SAP standard
    Release BAPI.
    Drag and drop the newly created MBO
    to Form editor to create the screen.
    For approval process set the submit
    type as online Request
    Set the newly created screen as
    default success screen.
    Regards,
    Fibeesh C.A

  • Please:How to repeat the return values multiple times in sapscript

    Currently my subroutine is returning a value called TOQBSSHB single time and i am working with standard layout called RFFOUS_C.Please can anybody tell me if i want to show multiple times TOQBSSHB for different values of VBLNR .Is it possible if it is what are changes i should make on layout and subroutine.
    PERFORM EXTRACT IN PROGRAM Y_MIT_TEST2
    USING &REGUH-VBLNR&
    USING &REGUH-NAME1&
    CHANGING&TOTQBSHB&
    ENDPERFORM
    FORM EXTRACT TABLES IN_PAR STRUCTURE ITCSY OUT_PAR STRUCTURE ITCSY.
    TABLES : REGUP,BSEG,REGUH,REGUD.
      DATA : BILL_NO LIKE REGUH-VBLNR.
      DATA : ITAB LIKE REGUP OCCURS 0 WITH HEADER LINE.
      DATA : JTAB LIKE REGUP OCCURS 0 WITH HEADER LINE.
      DATA : BELNR1 LIKE ITAB-BELNR.
      DATA : QBSHB1 LIKE REGUD-SWNES.
      DATA : QBSHB2 LIKE REGUD-SWNES.
      DATA : TOTOQBSHB LIKE REGUD-SWNES.
      READ TABLE IN_PAR WITH KEY NAME = 'REGUH-VBLNR'.
      IF SY-SUBRC = 0.
       BILL_NO = IN_PAR-VALUE.
      ENDIF.
    SELECT * FROM REGUP INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE VBLNR
    = BILL_NO.
      READ TABLE ITAB INDEX 1.
      IF SY-SUBRC = 0.
      MOVE ITAB-QBSHB TO QBSHB1.
      MOVE ITAB-BELNR TO BELNR1.
      ENDIF.
    SELECT * FROM BSEG INTO CORRESPONDING FIELDS OF TABLE JTAB WHERE BELNR
    = BELNR1.
      LOOP AT JTAB.
      READ TABLE JTAB INDEX SY-TABIX.
      IF SY-SUBRC = 0.
      QBSHB2 = QBSHB2 + JTAB-QBSHB.
      ENDIF.
      ENDLOOP.
      TOTOQBSHB = QBSHB1 + QBSHB2.
      READ TABLE OUT_PAR WITH KEY NAME = 'TOTQBSHB'.
      IF SY-SUBRC = 0.
      MOVE TOTOQBSHB TO OUT_PAR-VALUE.
      MODIFY OUT_PAR INDEX SY-TABIX.
      ENDIF.
    ENDFORM.

    I said :
    - A) you should copy the main program without to copy
         includes, so when the systems ask you which objects
         you want to copy: check all excluding INCLUDES.
    So you'll have a new program which uses the same includes of the standard program.
    - B) in your z-program you find the point where you should insert your code: you'll have two cases:
    - you should insert code in a point that is writen in z-program;
    - you should insert code in a point (for example a form) that isn't write in z-program, but in a standard include your z-program use.
    In first case you only write your code, in second one before you should copy the include, than insert it in your z-program and so insert your code in the include.
    For example:
    - A) Copy RFFOUS_C in ZRFFOUS_C
    - B) I should change the code of routine  
         SCHECKDATEN_EINGABE, it's defined in RFFORI01, so I copy it in ZRFFORI01, insert my code in it.
    - C) found where my z-program call include RFFORI01:
    subroutines for check print and prenumbered checks                  *
      INCLUDE RFFORI01.
    now replace this with the call to my new include:
      INCLUDE RFFORI01.
      INCLUDE ZRFFORI01.
    If you do in this way you copy only includes where you should change the code.
    Message was edited by: max bianchi
    Message was edited by: max bianchi

  • Multiple return values (Bug-ID 4222792)

    I had exactly the same request for the same 3 reasons: strong type safety and code correctness verification at compile-time, code readability and ease of mantenance, performance.
    Here is what Sun replied to me:
    Autoboxing and varargs are provided as part of
    JSRs 14 and 201
    http://jcp.org/en/jsr/detail?id=14
    http://jcp.org/en/jsr/detail?id=201
    See also:
    http://forum.java.sun.com/forum.jsp?forum=316
    http://developer.java.sun.com/developer/earlyAccess/adding_generics/index.html
    Multiple return values is covered by Bug-ID 4222792
    Typically this is done by returning an array.
    http://developer.java.sun.com/developer/bugParade/bugs/4222792.html
    That's exactly the problem: we dynamically create instances of array objects that would better fit well within the operand stack without stressing the garbage collector with temporary Array object instances (and with their backing store: 2 separate allocations that need to be recycled when it is clearly a pollution that the operand stack would clean up more efficiently)
    If you would like to engage in a discussion with the Java Language developers, the Generics forum would be a better place:
    http://forum.java.sun.com/forum.jsp?forum=316
    I know that (my report was already refering to the JSR for language extension) Generics is not what I was refering to (even if a generic could handle multiple return values, it would still be an allocated Object
    instance to pack them, i.e. just less convenient than using a static class for type safety.
    The most common case of multiple return values involve values that have known static datatypes and that should be checked with strong typesafety.
    The simple case that involves returning two ints then will require at least two object instances and will not solve the garbage collection overhead.
    Using a array of variable objects is exactly similar, except that it requires two instances for the components and one instance for the generic array container. Using extra method parameters with Integer, Byte, ... boxing objects is more efficient, but for now the only practical solution (which causes the least pollution in the VM allocator and garbage collector) is to use a custom class to store the return values in a single instance.
    This is not natural, and needlessly complexifies many interfaces.
    So to avoid this pollution, some solutions are used such as packing two ints into a long and returning a long, depacking the long after return (not quite clean but still much faster at run-time for methods that need to be used with high frequencies within the application. In some case, the only way to cut down the overhead is to inline methods within the caller code, and this does not help code maintenance by splitting the implementation into small methods (something that C++ can do very easily, both because it supports native types parameters by reference, and because it also supports inline methods).
    Finally, suppose we don't want to use tricky code, difficult to maintain, then we'll have to use boxing Object types to allow passing arguments by reference. Shamely boxed native types cannot be allocated on the operand stack as local variables, so we need to instanciate these local variables before call, and we loose the capacity to track the cases where these local variables are not really initialized by an effective call to the method that will assign them. This does not help debugging, and is against the concept of a strongly typed language like Java should be:
    Java makes lots of efforts to track uninitialized variables, but has no way to determine if an already instanciated Object instance refered in a local variable has effectively received an effective assignment because only the instanciation is kept. A typical code will then need to be written like this:
    Integer a = null;
    Integer b = null;
    if (some condition) {
    //call.method(a, b, 0, 1, "dummy input arg");
    // the method is supposed to have assigned a value to a and b,
    // but can't if a and b have not been instanciated, so we perform:
    call.method(a = new Integer(), b = new Integer(), 0, 1, "dummy input
    arg");
    // we must suppose that the method has modified (not initialized!)
    the value
    // of a and b instances.
    now.use(a.value(), b.value())
    // are we sure here that a and b have received a value????
    // the code may be detected at run-time (a null exception)
    // or completely undetected (the method() above was called but it
    // forgot to assign a value to its referenced objects a and b, in which
    // case we are calling in fact: now.use(0, 0); with the default values
    // or a and b, assigned when they were instanciated)
    Very tricky... Hard to debug. It would be much simpler if we just used:
    int a;
    int b;
    if (some condition) {
    (a, b) = call.method(0, 1, "dummy input arg");
    now.use(a, b);
    The compiler would immediately detect the case where a and b are in fact not always initialized (possible use bere initialization), and the first invoked call.method() would not have to check if its arguments are not null, it would not compile if it forgets to return two values in some code path...
    There's no need to provide extra boxing objects in the source as well as at run-time, and there's no stress added to the VM allocator or garbage collector simply because return values are only allocated on the perand stack by the caller, directly instanciated within the callee which MUST (checked at compile-time) create such instances by using the return statement to instanciate them, and the caller now just needs to use directly the variables which were referenced before call (here a and b). Clean and mean. And it allows strong typechecking as well (so this is a real help for programmers.
    Note that the signature of the method() above is:
    class call {
    (int, int) method(int, int, String) { ... }
    id est:
    class "call", member name "method", member type "(IILjava.lang.string;)II"
    This last signature means that the method can only be called by returning the value into a pair of variables of type int, or using the return value as a pair of actual arguments for another method call such as:
    call.method(call.method("dummy input arg"), "other dummy input arg")
    This is strongly typed and convenient to write and debug and very efficient at run-time...

    Can anyone give me some real-world examples where
    multiple return values aren't better captured in a
    class that logically groups those values? I can of
    course give hundreds of examples for why it's better
    to capture method arguments as multiple values instead
    of as one "logical object", but whenever I've hankered
    for multiple return values, I end up rethinking my
    strategy and rewriting my code to be better Object
    Oriented.I'd personally say you're usually right. There's almost always a O-O way of avoiding the situation.
    Sometimes though, you really do just want to return "two ints" from a function. There's no logical object you can think of to put them in. So you end up polluting the namespace:
    public class MyUsefulClass {
    public TwoInts calculateSomething(int a, int b, int c) {
    public static class TwoInts {
        //now, do I use two public int fields here, making it
        //in essence a struct?
       //or do I make my two ints private & final, which
       //requires a constructor & two getters?
      //and while I'm at it, is it worth implementing
      //equals(), how about hashCode()? clone()?
      //readResolve() ?
    }The answer to most of the questions for something as simple as "TwoInts" is usually "no: its not worth implementing those methods", but I still have to think about them.
    More to the point, the TwoInts class looks so ugly polluting the top level namespace like that, MyUsefulClass.TwoInts is public, that I don't think I've ever actually created that class. I always find some way to avoid it, even if the workaround is just as ugly.
    For myself, I'd like to see some simple pass-by-value "Tuple" type. My fear is it'd be abused as a way for lazy programmers to avoid creating objects when they should have a logical type for readability & maintainability.
    Anyone who has maintained code where someone has passed in all their arguments as (mutable!) Maps, Collections and/or Arrays and "returned" values by mutating those structures knows what a nightmare it can be. Which I suppose is an argument that cuts both ways: on the one hand you can say: "why add Tuples which would be another easy thing to abuse", on the other: "why not add Tuples, given Arrays and the Collections framework already allow bad programmers to produce unmainable mush. One more feature isn't going to make a difference either way".
    Ho hum.

  • Function return value == -10. Native error code -2146824584 ADOBD.Recordset: Operation is not allowed when object is closed

    I want to call Stored Procedure that return records and output parameter, from CVI
    I can get output parrameter but when I want to get records stream I recieve following wrror:
    function return value == -10. Native error code -2146824584 ADOBD.Recordset: Operation is not allowed when object is closed

    in Stored procedure I create table variable and and insert into string values
    when I remove usage of table variable the error desappear

  • Operations Manager Installation Error - Return Value 3

    Hello, I am having issues installing Operations Manager Reporting 2007 R2. The installation hangs with no status update a little more then midway through. I am receiving the following exception below. I am trying to install this on a named reporting instance.
    013-12-16T16:00:00.0547063-08:00 Debug:
     *** Trace Started ***
    2013-12-16T16:00:00.0859563-08:00 Debug:
    ConfigureOverridesForDWRules: Root Management Server is: CORP32-VS
    2013-12-16T16:30:01.7422063-08:00 Error:
    ConfigureOverridesForDWRules error: System.TimeoutException : The requested operation timed out.
    Exception thrown by custom action:
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.WindowsInstaller.InvalidHandleException: The handle is invalid.
       at Microsoft.WindowsInstaller.SessionProperties.set_Item(String name, String value)
       at Microsoft.Reporting.Setup.ReportingManagedCAs.ConfigureOverridesForDWRules(Session session)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)
       at Microsoft.WindowsInstaller.CustomActionProxy.InvokeCustomAction(Int32 sessionHandle, String entryPoint)
    CustomAction _ConfigureOverridesForDWRules.9B663534_CD9B_41CC_9D93_4E84D3C5E165 returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
    MSI (s) (1C:FC) [16:30:01:804]: NOTE: custom action _ConfigureOverridesForDWRules.9B663534_CD9B_41CC_9D93_4E84D3C5E165 unexpectedly closed the hInstall handle (type MSIHANDLE) provided to it. The custom action should be fixed to not close that handle.
    Action ended 16:30:01: InstallFinalize. Return value 3.
    MSI (s) (1C:80) [16:30:01:804]: User policy value 'DisableRollback' is 0
    MSI (s) (1C:80) [16:30:01:804]: Machine policy value 'DisableRollback' is 0
    MSI (s) (1C:80) [16:30:01:882]: Executing op: Header(Signature=1397708873,Version=500,Timestamp=1133543036,LangId=1033,Platform=589824,ScriptType=2,ScriptMajorVersion=21,ScriptMinorVersion=4,ScriptAttributes=1)
    MSI (s) (1C:80) [16:30:01:882]: Executing op: DialogInfo(Type=0,Argument=1033)
    MSI (s) (1C:80) [16:30:01:882]: Executing op: DialogInfo(Type=1,Argument=System Center Operations Manager 2007 R2 Reporting Server)
    MSI (s) (1C:80) [16:30:01:882]: Executing op: RollbackInfo(,RollbackAction=Rollback,RollbackDescription=Rolling back action:,RollbackTemplate=[1],CleanupAction=RollbackCleanup,CleanupDescription=Removing backup files,CleanupTemplate=File: [1])
    Action 16:30:01: Rollback. Rolling back action:

    Niki,
    I verified the data warehouse SQL server authentication account is indeed blank. I just tried running the installation again and received the following errors in the SQL log.
    12/18/2013 07:43:28,spid177,Unknown,Error 777970008<c/> severity 16<c/> state 1 was raised<c/> but no message with that error number was found in sys.messages. If error is larger than 50000<c/> make sure the user-defined message is
    added using sp_addmessage.
    12/18/2013 07:43:28,spid177,Unknown,Error: 18054<c/> Severity: 16<c/> State: 1.
    12/18/2013 07:43:28,spid88,Unknown,Error 777970008<c/> severity 16<c/> state 1 was raised<c/> but no message with that error number was found in sys.messages. If error is larger than 50000<c/> make sure the user-defined message is added
    using sp_addmessage.
    12/18/2013 07:43:28,spid88,Unknown,Error: 18054<c/> Severity: 16<c/> State: 1.
    12/18/2013 07:43:28,spid173,Unknown,Error 777970008<c/> severity 16<c/> state 1 was raised<c/> but no message with that error number was found in sys.messages. If error is larger than 50000<c/> make sure the user-defined message is added
    using sp_addmessage.
    12/18/2013 07:43:28,spid173,Unknown,Error: 18054<c/> Severity: 16<c/> State: 1.
    12/18/2013 07:43:18,spid173,Unknown,Error 777970008<c/> severity 16<c/> state 1 was raised<c/> but no message with that error number was found in sys.messages. If error is larger than 50000<c/> make sure the user-defined message is added
    using sp_addmessage.
    12/18/2013 07:43:18,spid173,Unknown,Error: 18054<c/> Severity: 16<c/> State: 1.
    12/18/2013 07:43:15,spid13s,Unknown,AppDomain 9702 (OperationsManager.dbo[ddl].9701) unloaded.
    12/18/2013 07:43:14,spid21s,Unknown,AppDomain 9701 (OperationsManager.dbo[ddl].9700) unloaded.
    Also, please see error in the MOMReporting log below:
    2013-12-18T07:41:54.8239565-08:00 Debug: ConfigureOverridesForDWRules: Root Management Server is: COR32
    2013-12-18T08:11:56.1874277-08:00 Error: ConfigureOverridesForDWRules error: System.TimeoutException : The requested operation timed out.
    Exception thrown by custom action:
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.WindowsInstaller.InvalidHandleException: The handle is invalid.
       at Microsoft.WindowsInstaller.SessionProperties.set_Item(String name, String value)
       at Microsoft.Reporting.Setup.ReportingManagedCAs.ConfigureOverridesForDWRules(Session session)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)
       at Microsoft.WindowsInstaller.CustomActionProxy.InvokeCustomAction(Int32 sessionHandle, String entryPoint)
    CustomAction _ConfigureOverridesForDWRules.9B663534_CD9B_41CC_9D93_4E84D3C5E165 returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
    MSI (s) (38:4C) [08:11:56:281]: NOTE: custom action _ConfigureOverridesForDWRules.9B663534_CD9B_41CC_9D93_4E84D3C5E165 unexpectedly closed the hInstall handle (type MSIHANDLE) provided to it. The custom action should be fixed to not close that handle.
    Action ended 8:11:56: InstallFinalize. Return value 3.
    MSI (s) (38:6C) [08:11:56:359]: User policy value 'DisableRollback' is 0
    MSI (s) (38:6C) [08:11:56:359]: Machine policy value 'DisableRollback' is 0
    MSI (s) (38:6C) [08:11:56:624]: Executing op: Header(Signature=1397708873,Version=500,Timestamp=1133657144,LangId=1033,Platform=589824,ScriptType=2,ScriptMajorVersion=21,ScriptMinorVersion=4,ScriptAttributes=1)

  • LiveCycle DS , can't get the return value of fill( arg) from Assembler class

    Hi all!
    I'm a have small problem , can any one help me? Please
    I make a project which very similar to Product project(in
    example).
    1) Have Assembler class: I work correctly
    package flex.samples.stock;
    import java.util.List;
    import java.util.Collection;
    import java.util.Map;
    import flex.data.DataSyncException;
    import flex.data.assemblers.AbstractAssembler;
    public class StockAssembler extends AbstractAssembler {
    public Collection fill(List fillArgs) {
    StockService service = new StockService();
    System.out.print(fillArgs.size());
    return service.getStocks();
    public Object getItem(Map identity) {
    StockService service = new StockService();
    return service.getStock(((Integer)
    identity.get("StockId")).intValue());
    public void createItem(Object item) {
    StockService service = new StockService();
    service.create((Stock) item);
    public void updateItem(Object newVersion, Object
    prevVersion, List changes) {
    StockService service = new StockService();
    boolean success = service.update((Stock) newVersion);
    if (!success) {
    int stockId = ((Stock) newVersion).getStockId();
    throw new DataSyncException(service.getStock(stockId),
    changes);
    public void deleteItem(Object item) {
    StockService service = new StockService();
    boolean success = service.delete((Stock) item);
    if (!success) {
    int stockId = ((Stock) item).getStockId();
    throw new DataSyncException(service.getStock(stockId),
    null);
    some require class is ok.
    2) I configure in data-management-config.xml
    <destination id="stockinventory">
    <adapter ref="java-dao" />
    <properties>
    <source>flex.samples.stock.StockAssembler</source>
    <scope>application</scope>
    <metadata>
    <identity property="StockId"/>
    </metadata>
    <network>
    <session-timeout>20</session-timeout>
    <paging enabled="false" pageSize="10" />
    <throttle-inbound policy="ERROR" max-frequency="500"/>
    <throttle-outbound policy="REPLACE"
    max-frequency="500"/>
    </network>
    </properties>
    </destination>
    3) My client app:
    I use :
    <mx:ArrayCollection id="stocks"/>
    <mx:DataService id="ds" destination="stockinventory"/>
    ds.fill(stocks); --> Problem here
    When I run this app, The StockAssembler on the server work
    correctly (i use printout to debug) . But variable stocks can't get
    the return value,it is a empty list.
    Please help me!

    Hi,                                                             
    The executeQueryAsync method is “asynchronous, which means that the code will continue to be executed without waiting for the server to
    respond”.
    From the error message “The collection has not been initialized”, which suggests that the object in use hadn’t been initialized after the execution of the executeQueryAsync method.
    I suggest you debug the code in browser to see which line of code will throw this error, then you can reorganize the logic of the code to avoid using the uninitialized object.
    A documentation from MSDN about Using the F12 Developer Tools to Debug JavaScript Errors
    for your reference:
    http://msdn.microsoft.com/en-us/library/ie/gg699336(v=vs.85).aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • Is there a class to return the r, g, b value of pixels in a picture

    Hi, there
    Is there a class to return an array of the R, G & B value of the pixels in a specified picture respectively. This picture is loaded from a file in jpg or gif format.
    Thanks in advance.

    xpost: see http://forum.java.sun.com/thread.jsp?forum=31&thread=204730

  • Multiple return values in Customized elementary search help

    Hello,
      I have a requirement when i select the value from F4 . It should populate the more than one return values in ALV grid in different rows .  
       Any FM or help search exit  is available to do this .
    Regards,
    kevin

    Hi Kevin,
    About your first question, for filling several fields of an ALV from a single F4 search help, I think that you should register F4 event to call the search help yourself (F4IF_INT_TABLE_VALUE_REQUEST for instance), and fill the ALV fields inside your F4 handler method. If you used REUSE_ALV_GRID_DISPLAY, then I am not sure how you can handle F4, but you can do it using CL_GUI_ALV_GRID or SALV classes. See BCALV_TEST_GRID_F4_HELP.
    About the second question, for filling automatically another field in the same row in the ALV grid, it should work automatically, as for normal dynpros, i.e. the search help must have these 2 fields defined as exporting, and these 2 fields of the ALV field catalog must refer to the same DDic structure, the search help must be assigned there to the field, and fill in the 2 exporting parameters too.
    Sandra

  • How to pass a function with the same argument multiple times and return values in variables?

    The problem I have is I created a function which really is some kind of database.  Basically a bunch of:
    if (a.value == "this number"){
    b.value = "this expression";
    Inside the form are 2 dropdown lists that return numerical values which I want to process through that function and put the return value inside separate variables.
    var a = this.getField("OPE003.EVEN.1.MIP");
    Mip(a);
    var result1 = Mip();
    I tried to overwriting *a* to process the second field
    a = this.getField("OPE003.EVEN.2.MIP");
    Mip(a);
    var result2 = Mip();
    result1 and result2 are put in an array, joined as a string.
    Doing so, I always get the last processing twice as the final result.
    Can I use a function as a batch processing tool that way?

    You are right, I changed the code to what you said but how do I pass another value through my fonction so I can get Result1 and Result2?
    is it
    var a = this.getField("OPE003.EVEN.1.MIP");
    var b = this.getField("OPE003.EVEN.2.MIP");
    var result1 = Mip(a);
    var result2 = Mip(b);
    var c = new Array[result1, result2]

  • Assigning LOV return Value to multiple text items

    Hi all
    I have a custom form on which i have 10 text items
    text item 1,text item 2 ....text item10
    I have a table xx_querywith fields
    text_item,query
    i have inserted into the xx_query table
    insert into xx_query(text_item,query)
    values(text_item1,'select sysdate from dual');
    insert into xx_query(text_item,query)
    values(text_item2,'select sysdate-1 from dual');
    I have created a record group dynamically and i am getting the query from the query column of the xx_query table into the record group(say test_rg)
    I have created a LOV test_lov and thr set_lov_property i have populated the test_rg query into the test_LOV
    is it possible for me to set the return item of the LOV dynamically so that i can get the LOV on the item which i want to ?
    thanks
    _

    Hi All
    thanks for your responses
    I have Created a control item and assigned the return value of the LOV to the control item
    and i have assigned the LOV to the text item that i want
    Currently when i navigate to the text item the LOV is visible
    but when i select a value from the LOV the value is not getting populated into the text item
    I have assigned the value of the control item to the text item
    but i am not sure in which trigger to write the code so as when i select the value from the LOV the value should be shown on the form populating in the text item
    Thanks

  • LOV problem with multiple return values.

    I created a ViewObject and in it a transient attribute.
    I create a ViewAccessor for another field and a LOV for it (default InputText with Lov Value).
    In List Return Values I added also my tranient attribute in order to receive another attribute from the accesor VO.
    When I run it from the Application browser I see my transient attribute emtpty even if the "source" attribute is not empty.
    If I change the value from the LOV the source value changes bit the transient is still empty.
    What's wrong ?
    Tks
    Tullio

    Repost.

  • Help : Complex parameter and return value in WebService?

    Hi guys
       These days, I publish a WebService, in it there is an
    operation like this:
       List search(List para);
       in this operation, parameter "para" is a java.util.List, which contains many elements, every element is an instance of customizing class "MyItem", I made "MyItem" implements java.io.Serializable interface. Strangely, when I call this operations in my java client,
    I found that I could not get out every element from para in server-side, but para.size() is showing it contains 10 elements in it. The same thing happen to the return value of this operation, in client, I got an instance of java.util.List class as the return value, when I try
    System.out.println(result.get(0)); it output "null", but
    result.size() is 10, I don't know how to explain this
       Does anyone who encounter this issue too?
    I guess it has something to with the Serializable issue ,but I have made every List item serializable, why it looks like this??

    Hi Kevin,
    I answered you by mail some days ago, but just to complete the thread, I am posting the hint also here:
    Custom types should be manually added to the Virtual Interface, so that they can be serialized.
    Best regards,
    Alexander

  • Web service return value

    I have a web service and I'm cfdumping the return variable, but I don't know how to get the value out.  This is what it is giving me.
    1
    object of com.nextaxiom.www.soapservice.xsd1.APApprovalList
    Class Name
    com.nextaxiom.www.soapservice.xsd1.APApprovalList
    Methods
    Method
    Return Type
    equals(java.lang.Object)
    boolean
    getAlertDate()
    java.lang.String
    getDescription()
    java.lang.String
    getDeserializer(java.lang.String, java.lang.Class, javax.xml.namespace.QName)
    org.apache.axis.encoding.Deserializer
    getInvoiceAmount()
    java.lang.Double
    getPaymentReferenceNumber()
    java.lang.String
    getSerializer(java.lang.String, java.lang.Class, javax.xml.namespace.QName)
    org.apache.axis.encoding.Serializer
    getTypeDesc()
    org.apache.axis.description.TypeDesc
    getUserName()
    java.lang.String
    getVendorName()
    java.lang.String
    hashCode()
    int
    setAlertDate(java.lang.String)
    void
    setDescription(java.lang.String)
    void
    setInvoiceAmount(java.lang.Double)
    void
    setPaymentReferenceNumber(java.lang.String)
    void
    setUserName(java.lang.String)
    void
    setVendorName(java.lang.String)
    void
    So some of this is the fields I want, but I want the value: description, alert date, invoice amt, etc.  Can anyone help me.  What do I need to do next to get the values?
    Here is my CF statement and the WSDL file.
    thanks for the help,
    BJ
    Invoke statement
                <cfinvoke
                                             webservice="http://127.0.0.1:8500/APApproval/GetAPApprovalList.wsdl"
                                             method="GetAPApprovalList" refreshwsdl="true"
                                             returnvariable="response">
                                                      <cfinvokeargument name="UserName" value="DAVBRY"/>
                                  </cfinvoke>
                <cfoutput>#response#</cfoutput>
    WSDL FILE
    <?xml version="1.0"?>
    <!--Automatically generated 10/07/2011 by Hyperservice Business Platform, NextAxiom Technology, Inc.-->
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
        name="BSAPrototype.APApproval.GetAPApprovalList"
        targetNamespace="http://www.nextaxiom.com/soapservice/BSAPrototype.APApproval.GetAPApprovalList/wsdl"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:tns="http://www.nextaxiom.com/soapservice/BSAPrototype.APApproval.GetAPApprovalList/wsdl"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://www.nextaxiom.com/soapservice/xsd1">
        <types>
            <schema xmlns="http://www.w3.org/2001/XMLSchema"
                elementFormDefault="qualified" targetNamespace="http://www.nextaxiom.com/soapservice/xsd1">
                <element name="GetAPApprovalList">
                    <complexType>
                        <sequence>
                            <element name="UserName" type="string"/>
                        </sequence>
                    </complexType>
                </element>
                <element name="GetAPApprovalListResult">
                    <complexType>
                        <sequence>
                            <element maxOccurs="unbounded"
                                name="APApprovalList" type="xsd1:APApprovalList"/>
                        </sequence>
                    </complexType>
                </element>
                <complexType name="APApprovalList">
                    <sequence>
                        <element minOccurs="0" name="UserName" type="string"/>
                        <element minOccurs="0" name="AlertDate" type="string"/>
                        <element minOccurs="0" name="Description" type="string"/>
                        <element minOccurs="0" name="PaymentReferenceNumber" type="string"/>
                        <element minOccurs="0" name="InvoiceAmount" type="double"/>
                        <element minOccurs="0" name="VendorName" type="string"/>
                    </sequence>
                </complexType>
            </schema>
        </types>
        <message name="GetAPApprovalListRequest">
            <part element="xsd1:GetAPApprovalList" name="GetAPApprovalList"/>
        </message>
        <message name="GetAPApprovalListResponse">
            <part element="xsd1:GetAPApprovalListResult" name="GetAPApprovalListResult"/>
        </message>
        <portType name="BSAPrototype.APApproval.GetAPApprovalListSoapPort">
            <operation name="GetAPApprovalList">
                <input message="tns:GetAPApprovalListRequest"/>
                <output message="tns:GetAPApprovalListResponse"/>
            </operation>
        </portType>
        <binding name="BSAPrototype.APApproval.GetAPApprovalListSoapBinding" type="tns:BSAPrototype.APApproval.GetAPApprovalListSoapPort">
            <soap:binding xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
                style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
            <operation name="GetAPApprovalList">
                <soap:operation
                    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="urn:doc?in=GetAPApprovalList?out=GetAPApprovalListResult?path=BSAPrototype.AP Approval.GetAPApprovalList"/>
                <input>
                    <soap:body use="literal"/>
                </input>
                <output>
                    <soap:body use="literal"/>
                </output>
            </operation>
        </binding>
        <service name="BSAPrototype.APApproval.GetAPApprovalList">
            <port
                binding="tns:BSAPrototype.APApproval.GetAPApprovalListSoapBinding" name="BSAPrototype.APApproval.GetAPApprovalListPort">
                <soap:address
                    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" location="http://nextaxb:7777/NXAServer/NextAxiomServer"/>
            </port>
        </service>
    </definitions>

    Getting complex objects back from web service calls are always tricky  - especially when they've been desearialized as an object.  We've found its a lot easier to deal with the Raw SOAP messages so at least we're working with an XML document, rather than a series of Getter functions, any of which that may return a NULL value (which does really unpleasant things to a CF variable).
    When you absolutely have to deal with a complex non-CF originating object in CF, we've found that you can actually use the underlying Java classes to identify and automatically execute the getter functions to effective dump out the variables.  We've rolled it up into a custom tag.  The base code for the logic is below:
    <cfset objVar = VARIABLE_CONTAINING_OBJECT_FROM_WEB_SERVICE>
    <cfset arrMethods = objVar.getClass().getMethods()>
    <cfoutput>
     <cfif isDefined("arrMethods") AND isArray(arrMethods) AND ArrayLen(arrMethods) gt 0>
     <table border="1" cellspacing="0" cellpadding="5" style="border-collapse:collapse;border:1px solid black;">
     <tr>
     <td colspan="3" style="background-color:##CCCCCC;">RESULT</td>
     </tr>
     <tr>
     <td>Method</td>
     <td>Class</td>
     <td>Return Value</td>
     </tr>
     <cfset sComplexMethods = "">
    <cfloop from="1" to="#ArrayLen(arrMethods)#" index="iMethod"> 
     <cfset sReturnType = arrMethods[iMethod].getReturnType().toString()>
    <cfif ListFindNoCase("int,java.lang.String,class java.lang.String,double,float,char", sReturnType)> 
     <tr>
     <td>#arrMethods[iMethod].getName()#</td>
     <td>#sReturnType#</td>
     <cfset sReturnValue = EVALUATE("objVar." & arrMethods[iMethod].getName() & "()")>
     <td><cfif isDefined("sReturnValue") AND sReturnValue neq "">#sReturnValue#<cfelse> </cfif></td>
     </tr>
    </cfif>
    #sComplexMethods#
    </cfloop>
     </table>
    </cfif>
    </cfoutput>

  • Exporting and returning value question

    What is different between exporting and returning value in method of a class. if created an object inside the method and exporting it, it means I have a reference to that object inside program. If I use returning value, it means I have a copy of object created inside the method, but the object inside method is destroyed after it ends. Do I understand correctly? if so what do u prefer exporting or returning value? thanks!

    Hello Anthony
    The major difference is that you can have multiple EXPORTING parameters yet only a single RETURNING parameter. In addition, if you have a RETURNING parameter you cannot have EXPORTING parameters simultaneously.
    Defining methods with a single RETURNING parameter is more Java-like than having multiple EXPORTING parameters.
    Whenever possible and sensible I prefer RETURNING parameters over EXPORTING parameters because they allow to use the function method call, e.g.:
    go_msglist = cf_reca_messagelist_create( ).
    Regards
      Uwe

Maybe you are looking for

  • After upgrading to Windows 8.1 iTunes Crashes

    As long as I don't try to access iTunes store, I can open iTunes.  I've deleted every trace of iTunes, including the users/username/AppData/AppleComputer/Local and Roaming folders,and everything in MyMusic folder except for the music and re-downloade

  • Adobe Air 3.0 iOS streaming H264/Speex over RTMP -- No Video

    Problem: H264/Speex RTMP stream from Flash Media Server doesn't display video.  Audio plays fine. Conditions: Adobe Air 3.0 iOS device (iPad 2, iOS4.3) App settings: <renderMode>direct</renderMode> Flash Builder 4.5.1 compiler settings: -swf-version=

  • Can multiple libraries be sync to the same iPod?

    As I start upload songs to iTunes library, quite quickly it has increased to 4 GB with the library big enough to use the side scroll bar. I guess we can have multiple libraries in iTunes in the same computer. But can multiple libraries be sync to the

  • Deleting all special GL can cause Database inconsistency?

    Hi Expert, With reference to the subject, I wonder deleting special GL indicators can cause database inconsistency. My Case: I deleted all of the SAP special GL indicator, and recreated those I want with my own naming convention, which some of them s

  • How to display  the rank

    Hi, http://rapidshare.com/files/401755613/Kishore.jpg.html please download the file by using link. that is the snapshot of my requirement. I wand to display the rank based on the value seleted on the column selector The Rank should be applied based o