Multiplt Description should be set for multiple Transient Attributes

Hi!!
I am using jdeveloper 11.1.1.5
I had created a VO such as BusEntityVO in this i had an attribute such as City,State,Country I had also created an transient attribute such as citydesc,countrydesc,statedesc.,
I need to create an LOV for City Attribute so that while my user clicks the LOV
these values should be set
City , Citydesc ,State, StateDesc,Country, CountryDesc
I had created and VO using the following querry
select city,cityname1,state,statename1,country,countryname1 from cities,states,countries where city_state_id = state_id and state_ctry_id = cntry_id
In my List of Values i had done the following by using reference attributes
My Scenario i need to set the description corresponding to city,state,country

Hi,
Have you tried creating the view object based on multiple entities and use the list's data source entities as reference?
Say for ex. If you have a person table with countryID, stateID and cityID and the corresponding tables has the description (say country table having countryID and countryDesc), try creating a VO based on PersonEO, CountryEO etc and keep only the PersonEO as updatable and others as reference?
http://docs.oracle.com/cd/E21043_01/web.1111/b31974/bcadvvo.htm#CEGCAJCI
-Arun

Similar Messages

  • The value should be set for Base image URL and Image file directory

    Hi experts
    Now customer has the following issue.
    XML Publisher concurrent request, using RTF layout template with LOGO, does not generate the LOGO for Excel output.
    but in output formats PDF, it is shown normally.
    from the debug log, we can found the following error message
    ======
    [051812_054716051][][ERROR] Could not create an image. Set html-image-dir and html-image-base-uri correctly.
    ======
    so I tell the customer to do the following action plan.
    1. in XML Publisher Administrator resp > Administration expand the HTML Output section.
    2a. enter a value for 'Base image URI'
    2b. enter a value for 'Image file directory'
    Customer set the value as following and retest this issue,but he found the issue is not solved.
    Base image URI: /u01/r12/ebssnd/apps/apps_st/comn/java/classes/oracle/apps/media/XXSLI_SONY_LIFE_LOGO.gif
    Image file directory: /u01/r12/ebssnd/apps/apps_st/comn/java/classes/oracle/apps/media
    I verified 'Base image URI' and 'Image file directory' settings:
    1) Change output type to HTML.
    2) Click the Preview.
    but the image is correctly displayed on HTML, so I think the issue is caused by user's uncorrectly setting of the base image URL and/or image file directory
    but could anyone give me some advice on which value should be set for Base image URL and Image file directory
    Regards
    shuangfei

    First thing to do is to edit the post and use some tags to format the code as it is unreadable and too much!
    Read the FAQ (https://forums.oracle.com/forums/help.jspa) to find out how to do this.
    Next we need to know the jdev version you are using!
    As the code is generated I would first try to generate it again after the db change.
    Timo

  • "Java" is not a valid setting for the language attribute

    Got an exception on Weblogic 10.3 after deployment in the JSP as ""Java" is not a valid setting for the language attribute"
    I installed weblogic 10.3 and deployed one of the applications.
    The JSP containing code like <%@ page language="Java" import=" is giving error.
    The error message is like this
    "Java" is not a valid setting for the language attribute"
    Please let me know if i need to include some jars or change some setting.
    Thanks and Regards
    Manoj

    Thanks a lot.
    It is working now with small j of java. But i would still like to know why it was working in Oracle 10g app server and tomcat 5.0 server as well, but not in weblogic 10.3 server. If possible please tell me.
    Thanks and Regards
    manoj

  • Getting Multiple Shipping Document sets for multiple deliveies

    Hi,
    I have a trip with multiple deliveries. After ship confirming the trip from a Trips tab, the reports in shipping document set printing multiple times one each for a delivery.
    How can I get the shipping document set to be submitted once per trip?
    Thank you,
    Prashanth

    Hi,
    For your requirement, here is a solution like this:
    1.Create 3 custom Document content types inherit the built-in Document content type;
    2.Create 3 custom Document Set content types inherit the built-in Document Set content type;
    3.In the “Document Set settings” page of each custom Document Set content type, remove the “Document” content type from the “Allowed Content Types”;
    4.Now we can create a Document Library and add the 3 custom Document Set content types into it.
    5.Remove the Document content from the “Content Types” in the “Document Library Settings” page.
    Here is how it works like in my environment:
    In "Document Library Settings" page:
    Best regards
    Patrick Liang
    TechNet Community Support

  • Is there a best rip setting for multiple devices?

    I want to start converting my DVD library to computer files so I can import into iTunes and then access it anywhere. I bought a program called Wondershare Video Converter Ultimate Mac which offers a TON of settings choices. I did this with all my CDs years ago but it was easy. I set everything at 192 MP3 and can listen on anything. But for video it seems more complicated. So for devices where I might watch, I have:
    iPhone4
    iPad orginal,
    AppleTV 2 and
    Samsung 55" LED TV through home theater
    BTW, I'm using a Mac Pro, 8 GBs RAM and lots of drives space, running OSX 10.6.8, but will be migrating to Lion and iCloud later this week.
    In reading Wondershare's many output settings choices, I'm wondering if I need to output multiple file versions like:
    MP4 for my iPad or iPhone
    M4V for my AppleTV and ultimately my 55" TV
    And then there's the question of resolution. The default for either their MP4 or M4V is: 1280 x 720
    Is that high enough quality if I WiFi stream from iTunes > AppleTV > 55" TV?  Or do I need to set the resolution to Wondershare's highest setting: 1920 x 1080 for best quality. And if the answer is yes, go higher, if I want to watch on my iPad or even iPhone, how will 1920 x 1080 work out? Does the device downsize or something and able to play a larger resolution file?
    So given the range of devices that I might watch, is it possible to create one output file based on one "one size fits all" type setting that will work on all my potential applications/devices?
    Can AppleTV handle MP4 files even though Wondershare specifies M4V if you choose their setting AppleTV for your output device and visa versa with M4V for iPads and iPhones?
    Lastly, I have no clue what the settings are in my original DVDs. Maybe I can see this in Wondershare. I'll look. But if the original is 1280x720 and I set my rip resolution to 1920x1080 will I end up with less quality because I'm converting upward from the resolution of the original?
    If my large screen TV requires 1920 x 1080 for best quality and I'm playing a video that is 1280 x 720 on it, then I assume the TV resamples it (is that the word?) and upscales it to whatever resolution it runs at? If so, where is the best place to create the higher/larger resolution? At the rip stage or in viewing stage on the fly done by the TV?
    So much to learn.... I hate being a newbee. but hopefully this will be a helpful thread for others in the same boat as we all look toward digitizing our lives
    Thanks,
    Steven

    I want to start converting my DVD library to computer files so I can import into iTunes and then access it anywhere. I bought a program called Wondershare Video Converter Ultimate Mac which offers a TON of settings choices. I did this with all my CDs years ago but it was easy. I set everything at 192 MP3 and can listen on anything. But for video it seems more complicated. So for devices where I might watch, I have:
    iPhone4
    iPad orginal,
    AppleTV 2 and
    Samsung 55" LED TV through home theater
    BTW, I'm using a Mac Pro, 8 GBs RAM and lots of drives space, running OSX 10.6.8, but will be migrating to Lion and iCloud later this week.
    In reading Wondershare's many output settings choices, I'm wondering if I need to output multiple file versions like:
    MP4 for my iPad or iPhone
    M4V for my AppleTV and ultimately my 55" TV
    And then there's the question of resolution. The default for either their MP4 or M4V is: 1280 x 720
    Is that high enough quality if I WiFi stream from iTunes > AppleTV > 55" TV?  Or do I need to set the resolution to Wondershare's highest setting: 1920 x 1080 for best quality. And if the answer is yes, go higher, if I want to watch on my iPad or even iPhone, how will 1920 x 1080 work out? Does the device downsize or something and able to play a larger resolution file?
    So given the range of devices that I might watch, is it possible to create one output file based on one "one size fits all" type setting that will work on all my potential applications/devices?
    Can AppleTV handle MP4 files even though Wondershare specifies M4V if you choose their setting AppleTV for your output device and visa versa with M4V for iPads and iPhones?
    Lastly, I have no clue what the settings are in my original DVDs. Maybe I can see this in Wondershare. I'll look. But if the original is 1280x720 and I set my rip resolution to 1920x1080 will I end up with less quality because I'm converting upward from the resolution of the original?
    If my large screen TV requires 1920 x 1080 for best quality and I'm playing a video that is 1280 x 720 on it, then I assume the TV resamples it (is that the word?) and upscales it to whatever resolution it runs at? If so, where is the best place to create the higher/larger resolution? At the rip stage or in viewing stage on the fly done by the TV?
    So much to learn.... I hate being a newbee. but hopefully this will be a helpful thread for others in the same boat as we all look toward digitizing our lives
    Thanks,
    Steven

  • Multiple Keyword Sets (For Multiple Databases)

    I work with several different Lightroom databases and it would be nice to be able to have separate sets of keywords that go with each database.
    In my specific case, I use one database for my personal photographic endeavors and another for an image library for our church. The keywords tags used for my Nature photography images and the tags used for the event photography shots for church are very different. Hence, there are lots of keywords in both libraries that have zero images attached to them.
    It would be very useful in you could allow multiple keyword sets to track with multiple databases.
    Dave Mayfield

    There issues'Purge unused Keywords' option under Menu/Metadata.
    Don't ya know.
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.9 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

  • Work Manager 6.2 (CS) - Longtext not set for multiplie Notification Activities

    Hi all,
    I am trying to post multiple activities, each with its own long text from the work manager. The thing is that only the first activity will have the long text. While debugging /SYCLO/IF_CORE_DO_HANDLER~CREATE (/SMERP/CL_CS_NOTIFICATION_DO), I found a curious piece of code, that basically does the following:
    Loop over activities (outer loop)
    Get a fresh sort number
    Loop over long texts (inner loop)if the long text sort number matches the activity sort number (the activity from the outer loop)
    then replace the long text sort number by the fresh sort number and remove the long text from the list of long texts and copy its values to another list
    else remove the long text from the list of long texts and copy its values to another list
    replace the activity sort number (the activity from the outer loop) with the fresh sort number
    What happens with multiple activities is that in the inner loop, all the long texts are removed from the list of long texts (even those that are matching the second, third, ... activity in the activity list). Therefore, only for the first activity, long texts are added. Did anyone else encounter this problem (if this is working for anyone, could you provide me with your BAPI parameters)? Any idea on what SAPWM-911 is about (would it be safe to get rid of that part)?
                 LOOP AT me->tab_notif_activity ASSIGNING <notif_activity>.
                   ADD 1 TO lv_sort_no.
                   LOOP AT lt_notif_longtext INTO ls_notif_longtext WHERE objtype = lc_ltext_notif_activity.
                     lv_index = sy-tabix.
                     IF ls_notif_longtext-objkey+4(4) = <notif_activity>-act_sort_no.
                       ls_notif_longtext-objkey+4(4)  = lv_sort_no.
                       APPEND INITIAL LINE TO me->tab_notif_longtext ASSIGNING <notif_longtext>.
                       MOVE-CORRESPONDING ls_notif_longtext TO <notif_longtext>.
                       DELETE lt_notif_longtext INDEX lv_index.
                       "<--Ins 332_700 SP1 - SAPWM-911 - Start
                     ELSE.
                       "Check for remaining longtext rows not matching with parent table
                       "is considered as update to the existing activity notes
                       APPEND INITIAL LINE TO me->tab_notif_longtext ASSIGNING <notif_longtext>.
                       MOVE-CORRESPONDING ls_notif_longtext TO <notif_longtext>.
                       DELETE lt_notif_longtext INDEX lv_index.
                       "<--Ins 332_700 SP1 - SAPWM-911 - End
                     ENDIF.
                   ENDLOOP.
                   <notif_activity>-act_sort_no = lv_sort_no.
                 ENDLOOP.
    Thanks in advance for any contribution to this problem.
    Regards, Daniel

    Hi Daniel,
    I would suggest you raise an OSS message to get this fixed if you believe its bug.
    With Regards
    Murali

  • Proxy Setting for Multiple WiFi Access Points

    I'm getting ready to roll out 30 iPads in a school setting.  They are going to be on a cart that teachers will be able to check out for class use, but will be returned to the computer lab each evening.  This creates a problem.
    Throughout the building, we have several WiFi access points - next year we will have an access point in each classroom.  And of course we connect through a proxy server so that the district can block various wbsites.  As I am setting up my iPad to connect to each access point, I have to set the proxy server address for the access point; I would really like to be able to simply say "This is my proxy server address and port for EVERY WiFi access point in the building." and be done with it.  I haven't been able to find a way to do this -- it looks like I have to configure each access point individually.
    Am I just missing something (I hope)?

    I suspect you have the D-Link set up to make its network an entirely new subnet using NAT.
    If you setup the D-Link as a bridge to the network created by the Extreme, things may work properly.
    You may need to refer to the D-Link documentation to find out the proper way to do this.

  • Authorization for multiple nav attributes

    Hi Experts,
    I have 2 doubts that I need to confirm with you:
    Scenario :
    an aggregation level has nav attributes  A__C  and B__C.
    A__C is restricted by authorization variable in the filter section of the query.
    A__C is shown in the rows as well.
    B__C is not defined anywhere in the aggregation level and the query.
    Authorization is created for the user on  A__C   and  B__C   and assigned to user via the BI7 auth admin tcode(s).
    The requirement is to control such that user cannot  access certain values of  Both  A__C  values and  B__C values found in records. In this case,  user is set to access  only  :
    A__C  :   1111
    B__C  :   2222
    A record exist like this :
    A__C     ****     B__C   ****  KF
    1111      ****     3333    ****  $1000
    Question:
    1.  when the query is executed, authorization check is ok for  A__C  and the query should execute.
    But given that this user is not authorized to B__C  = 3333,   will the KF value of $1000  be displayed by the query at runtime assuming the query only is selecting A__C and the KF?
    If it does not show results or shows 'not authorized' , can I say its due to B__C = 2222 is granted and not B__C = 3333 was granted?
    Else if it does show the $1000, can I say that even if B__C  is set = 2222 in the user profile / authorization object assigned,  there is no effect of authorization in this case and the record having B__C = 3333 will be displayed with the KF value (B__C value still will not be shown as its not in the query definition).
    2.   Assuming char C is defined in the query and aggregation level,  must this be individually restricted (i.e set auth of  C = value1, value2 .....)  in authorization object or roles in order that the effect of A__C is achieved where authorization values for A__C is defined by  setting auth of A__C = value 1, value2 ...?
    Scenario A:  char C is in the aggregation level but not used in the query definition in the rows and filter.
    Scenario B :  char C is in the aggregation level and used in the query definition in the rows.
    What would the result be in the above 2 scenarios ?
    Hope to get enlightened about this aspects.
    Thanks in advance.
    Best regards
    PRex
    Edited by: pointes rexiproca on Apr 3, 2008 6:21 PM
    Edited by: pointes rexiproca on Apr 3, 2008 6:22 PM

    Dear Pointes,
    For management authorization by navigational attribute, I suggest the following steps:
    1.     Should check the attribute setup of “A” and “B” InfoObject in Tcode RSD1, and be sure if they are relevant of authorization. Remember, in BI2004s the attribute navigational are different component authorization.
    2.     Then, you should check your analysis authorization in Tcode RSECADMIN Authorization and verify which these attributes navigational A__C and B__C are included in analysis authorization, and what value do they have? Be careful which logical sing “<, >, =…”. Also, remember include colum “:” value in each attribute navigational for avoid problem.
    3.     Before that, you should check the queries structure and be sure if theses attribute is like a entry variable authorization.
    I hope that can help you,
    Luis

  • Lock NOT set for loading masterdata/attributes - already locked

    Dear all,
    I've searched this forum for similar topics bu couldn't find a solution yet
    I'm loading masterdata for 0PERSON but an error appears stating' Master data table or text table already locked'.
    I've checked if there is an attribute change run active but there isn't anything, I've executed all of them where necessary.
    Transaction RSRV is not showing problems for the info object (No SIDS missing etc)
    There are no locked records in SM12/SR12.
    I've tried to reload the infopackage and run the DTP again but without success.
    Please advice how to unlock the table.
    Regards
    Markus

    Hi,
    Just check following
    1. Whether there is any active job in SM37 for loading this master data ,if anything triggered manually
    2. Check whether any R/3 job is active for this master data
    3. Check whether any attribute change run job is active
    4. Check whether any roll up /BIA job is running
    5. Check consistency of table in SE14 and RSRV for master data
    6. Try to manually activate and see if same error is coming?
    Also check following thread
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0869e29-1405-2e10-27be-db1dad7703c5?QuickLink=index&overridelayout=true
    Thanks and regards

  • What value should set for wrapper.java.initmemory?

    Hi guys,
    If this is the wrong forum to ask, I hereby apologize as I am not sure which forum should I deposit this question.
    I am using jboss4.0.5 installing in Cent OS with memory of 1024MB and jdk 1.5.0_08. Hence, what value should I set for wrapper.java.initmemory and wrapper.java.maxmemory? What actually is the wrapper.java for compare to JAVA_OPTS? my current configuration is like below:
    # Wrapper Properties
    # Java Application
    set.JAVA_HOME=/usr/java/j2sdk
    wrapper.java.command=%JAVA_HOME%/bin/java
    set.JBOSS_CONFIG=default
    set.JBOSS_HOME=/opt/jboss4
    set.JBOSS_LOG=/var/log/jboss4/%JBOSS_CONFIG%
    # Use new ticker
    wrapper.use_system_time=FALSE
    # Java Main class
    wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
    # Java Classpath (include wrapper.jar) Add class path elements as
    # needed starting from 1
    wrapper.java.classpath.1=%JBOSS_HOME%/lib/wrapper.jar
    wrapper.java.classpath.2=%JBOSS_HOME%/bin/run.jar
    wrapper.java.classpath.3=%JAVA_HOME%/lib/tools.jar
    # Java Library Path (location of Wrapper.DLL or libwrapper.so)
    wrapper.java.library.path.1=%JBOSS_HOME%/lib
    # Java Additional Parameters
    wrapper.java.additional.1=-Dprogram.name=run.sh
    wrapper.java.additional.2=-Djava.endorsed.dirs=%JBOSS_HOME%/lib/endorsed
    # Initial Java Heap Size (in MB)
    wrapper.java.initmemory=64
    # Maximum Java Heap Size (in MB)
    wrapper.java.maxmemory=128
    # Application parameters. Add parameters as needed starting from 1
    wrapper.app.parameter.1=org.jboss.Main
    wrapper.app.parameter.2=-c
    wrapper.app.parameter.3=%JBOSS_CONFIG%
    # Port which the native wrapper code will attempt to connect to
    wrapper.port=1777
    wrapper.startup.timeout=300
    wrapper.ping.timeout=300
    wrapper.shutdown.timeout=300
    wrapper.disable_shutdown_hook=TRUE
    wrapper.request_thread_dump_on_failed_jvm_exit=TRUE
    # Wrapper Logging Properties
    # Format of output for the console. (See docs for formats)
    wrapper.console.format=PM
    # Log Level for console output. (See docs for log levels)
    wrapper.console.loglevel=INFO
    # Log file to use for wrapper output logging.
    wrapper.logfile=%JBOSS_LOG%/server.log
    # Format of output for the log file. (See docs for formats)
    wrapper.logfile.format=LPTM
    # Log Level for log file output. (See docs for log levels)
    wrapper.logfile.loglevel=NONE
    # Maximum size that the log file will be allowed to grow to before
    # the log is rolled. Size is specified in bytes. The default value
    # of 0, disables log rolling. May abbreviate with the 'k' (kb) or
    # 'm' (mb) suffix. For example: 10m = 10 megabytes.
    wrapper.logfile.maxsize=0
    # Maximum number of rolled log files which will be allowed before old
    # files are deleted. The default value of 0 implies no limit.
    wrapper.logfile.maxfiles=0
    # Log Level for sys/event log output. (See docs for log levels)
    wrapper.syslog.loglevel=NONE
    # Wrapper NT Service Properties
    # WARNING - Do not modify any of these properties when an application
    # using this configuration file has been installed as a service.
    # Please uninstall the service before modifying this section. The
    # service can then be reinstalled.
    # Name of the service
    [email protected]@
    # Display name of the service
    [email protected]@
    # Description of the service
    [email protected]@
    # Service dependencies. Add dependencies as needed starting from 1
    wrapper.ntservice.dependency.1=
    # Mode in which the service is installed. AUTO_START or DEMAND_START
    wrapper.ntservice.starttype=AUTO_START
    # Allow the service to interact with the desktop.
    wrapper.ntservice.interactive=false
    Thanks & Regards,
    Mark

    Hello Kumar,
    The following should be the recommended parameters for your case. Always take a backup of initSID.ora and spfileSID.ora file before making the changes.
    fixcontrol Bug fix control parameter
    *._fix_control='5705630:ON','5765456:3','6221403:ON','6329318:ON','6399597:ON','6430500:ON','6440977:ON','6626018:ON','6670551:ON','6972291:ON','7325597:ON','7692248:ON','7891471:ON'
    max_dump_file_size = 20000
    optimizer_index_caching Adjust the usage of nested loops 0
    optimizer_index_caching (do not set)
    optimizer_index_cost_adj Percentage of the calculated index costs 100
    optimizer_index_cost_adj = 20
    parallel_max_servers=20
    parallel_threads_per_cpu = 1
    shared_pool_reserved_size
    CPUs   Shared_Pool_Size  
       4              500M                
       6                1G                   
      10                1G                
      32                2G                
      64                2G                
    128                3G      
    Resize db_cache depending on your needs. For your case, I would recommend at least 2GB of RAM for db_cache
    pushjoin_union_view
    pushjoin_union_view = false
    Set this as true if 6917874 fix is implemented.
    In addition Oracle processes should be calculated as follows
    Oracle Processes =
    { ABAP WP X 2  +
    J2ee Server Processes*MaxConnection  + Parallel_Max_Servers   + 40 }
    Hope I am clear.
    Thanks,
    Venkatesh Pydi.

  • Visible property for transient attribute.

    Hi,
    I am using J developer 11g Release 2.In my page i need to set the visible property for the transient attribute(conform password) because the transient attribute needs to be disable for some condition.I have tried but the property was working only when the attribute is not transient.Can we set the property for transient attribute?
    Help me on this..
    Thanks,
    Suganya.
    Edited by: Suganya on Feb 27, 2012 1:40 AM

    Disabling the visbile property:
    <af:inputText autoSubmit="true" id="it6" label="Table Attr"> </af:inputText>
    <af:inputText partialTriggers="it6" visible="#{bindings.AphdBe.inputValue eq null? 'false' : 'true'} " id="it2" label="Trans Attr"> </af:inputText>like this you should h'd.
    normally we use transiet term in vo's while coming to part ui.
    it will consider as attribute. no thing difference bwtn those attribute as timo says.
    --edited lately.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Currency setting in multiple company code.

    Dear all,
    we are having 3 company codes in one client.
    and we have to set the Currency setting for multiple company codes.
    Tcodes
    S_BCE_68000174 - Enter Translation Rates
    S_ALR_87003642 - Open and Close Posting Periods
    it is not allowing us to set the values at a same time for different company codes by different users
    it says " DATA LOCKED BY OTHER USER, ONLY DISPLAY MODE."
    Pls assist
    Thanks

    Ask for access to delete lock entries. If access is provided, use T code sm12 to delete the lock entries.
    @ Irfan you cannot do that. Only one user can use a table at a time.
    It is like using an ATM. Only one person can withdraw money at a time.
    Edited by: Dummy_Variable on Jul 27, 2011 9:34 AM

  • Opening & closing balance for Multiple Vendors

    Hi Friends,
    I have an issue. This is my code.
    *& Report  ZVEN_OPEN_CLOSE_BAL
    REPORT  ZVEN_OPEN_CLOSE_BAL.
    *& Report  ZVEN_OPEN_CLOSE_BAL
    TABLES:lfa1,bsik.
    TYPES: BEGIN OF ty_bsik,
           bukrs TYPE bsik-bukrs,
           lifnr TYPE bsik-lifnr,
           augbl TYPE bsik-augbl,
           zuonr TYPE bsik-zuonr,
           gjahr TYPE bsik-gjahr,
           xblnr TYPE bsik-xblnr,
           belnr TYPE bsik-belnr,
           buzei TYPE bsik-buzei,
           blart TYPE bsik-blart,
           bldat TYPE bsik-bldat,
           budat TYPE bsik-budat,
           shkzg TYPE bsik-shkzg,
           dmbtr TYPE bsik-dmbtr,
    *       bal   TYPE char30,
           sgtxt TYPE bsik-sgtxt,
           END OF ty_bsik.
    TYPES: BEGIN OF ty_bsak,
           bukrs TYPE bsik-bukrs,
           lifnr TYPE bsak-lifnr,
           augbl TYPE bsak-augbl,
           zuonr TYPE bsak-zuonr,
           gjahr TYPE bsik-gjahr,
           belnr TYPE bsak-belnr,
           buzei TYPE bsik-buzei,
           budat TYPE bsak-budat,
           bldat TYPE bsak-bldat,
           xblnr TYPE bsak-xblnr,
           blart TYPE bsak-blart,
           shkzg TYPE bsak-shkzg,
           dmbtr TYPE bsik-dmbtr,
    *      shkzg1 TYPE bsak-shkzg,
           sgtxt TYPE bsak-sgtxt,
           END OF ty_bsak.
    TYPES: BEGIN OF ty_lfc1,
            lifnr TYPE lfc1-lifnr,
            bukrs TYPE lfc1-bukrs,
            gjahr TYPE lfc1-gjahr,
            umsav TYPE lfc1-umsav,
            END OF ty_lfc1.
    TYPES: BEGIN OF ty_all,
            lifnr TYPE bsik-lifnr,
            zuonr TYPE bsik-zuonr,
            xblnr TYPE bsik-xblnr,
            belnr TYPE bsik-belnr,
            hkont TYPE bseg-hkont,
            blart TYPE bsik-blart,
            ltext TYPE text20,
            bldat TYPE bsik-bldat,
            budat TYPE bsik-budat,
            opbal TYPE p DECIMALS 2,
            deb   TYPE p DECIMALS 2 ,"bsik-dmbtr,
            cre   TYPE p DECIMALS 2,"bsik-dmbtr,
            bal   TYPE p DECIMALS 2,
            augbl TYPE bsik-augbl,
            sgtxt TYPE bsik-sgtxt,
          END OF ty_all.
    TYPE-POOLS: slis.
    DATA:  t_layout   TYPE slis_layout_alv,
           s_fieldtab TYPE slis_fieldcat_alv,
           t_fieldtab TYPE slis_t_fieldcat_alv,
           wa_header TYPE slis_listheader,
           it_header TYPE  slis_t_listheader.
    DATA:it_bsik TYPE TABLE OF ty_bsik,
         it_bsak TYPE TABLE OF ty_bsak,
         it_all  TYPE TABLE OF ty_all,
         it_lfc1 TYPE TABLE OF ty_lfc1,
         it_t003 TYPE TABLE OF t003t,
         wa_bsik TYPE ty_bsik,
         wa_bsak TYPE ty_bsak,
         wa_all  TYPE ty_all,
         wa_lfc1 TYPE ty_lfc1,
         wa_t003 TYPE t003t.
    DATA:  gt_fldcat    TYPE slis_t_fieldcat_alv,
           gs_fldcat    TYPE slis_fieldcat_alv,
           gs_layout    TYPE slis_layout_alv,
           gv_save      TYPE c VALUE 'X'.
    types :BEGIN OF ty_bseg,
            BUKRS TYPE BUKRS,
            BELNR  TYPE BELNR_D,
            GJAHR  TYPE GJAHR,
            BUZEI  TYPE BUZEI,
            koart type koart,
            HKONT TYPE HKONT,
           END OF ty_bseg.
    DATA: it_bseg type TABLE OF ty_bseg,
          wa_bseg type ty_bseg.
      data t_balence TYPE TABLE OF BAPI3008_3 WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr,
                     s_bukrs FOR bsik-bukrs,
                     s_budat FOR bsik-budat OBLIGATORY.
    PARAMETERS : p_gjahr TYPE bsik-gjahr OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM process_data.
      PERFORM display.
    *&      Form  GET_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM get_data .
      break naidu.
      SELECT  bukrs
              lifnr
              augbl
              zuonr
              gjahr
              xblnr
              belnr
              buzei
              blart
              bldat
              budat
              shkzg
              dmbtr
              sgtxt FROM bsik
              INTO TABLE it_bsik
              WHERE lifnr IN s_lifnr AND
                    bukrs IN s_bukrs AND
                    budat IN s_budat AND
                    gjahr = p_gjahr .
      SELECT bukrs
             lifnr
             augbl
             zuonr
             gjahr
             belnr
             buzei
             budat
             bldat
             xblnr
             blart
             shkzg
             dmbtr
             sgtxt FROM bsak
             INTO TABLE it_bsak
             WHERE lifnr IN s_lifnr AND
                   bukrs IN s_bukrs AND
                   budat IN s_budat AND
                   gjahr = p_gjahr .
    if it_bsik is INITIAL and it_bsak  is INITIAL.
    *DATA  v_date type budat.
    *data :year(4),
    *      month(2),
    *      date(2).
    *  year  = s_budat-low+0(4).
    *  date  = s_budat-low+6(2).
    *  month = s_budat-low+4(2).
    *  month = month - 01.
    *CONCATENATE year month date INTO v_date .
    *  SELECT  bukrs
    *          lifnr
    *          augbl
    *          zuonr
    *          gjahr
    *          xblnr
    *          belnr
    *          buzei
    *          blart
    *          bldat
    *          budat
    *          shkzg
    *          dmbtr
    *          sgtxt FROM bsik
    *          INTO TABLE it_bsik
    *          WHERE lifnr IN s_lifnr AND
    *                bukrs in s_bukrs and
    *                budat eq v_date AND
    *                gjahr = p_gjahr .
    *  SELECT bukrs
    *         lifnr
    *         augbl
    *         zuonr
    *         gjahr
    *         belnr
    *         buzei
    *         budat
    *         bldat
    *         xblnr
    *         blart
    *         shkzg
    *         dmbtr
    *         sgtxt FROM bsak
    *         INTO TABLE it_bsak
    *         WHERE lifnr IN s_lifnr AND
    *               bukrs IN s_bukrs AND
    *               budat eq v_date AND
    *               gjahr = p_gjahr .
      CALL FUNCTION 'BAPI_AP_ACC_GETKEYDATEBALANCE'
        EXPORTING
          companycode        = s_bukrs-low
          vendor             = s_lifnr-low
          keydate            = s_budat-low
    *     BALANCESPGLI       = ' '
    *     NOTEDITEMS         = ' '
    *   IMPORTING
    *     RETURN             =
        TABLES
          keybalance         = t_balence
      endif.
    ENDFORM.                    " GET_DATA
    *&      Form  PROCESS_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM process_data .
      DATA:v_bal TYPE netpr.
      LOOP AT it_bsak INTO wa_bsak.
        wa_bsik-bukrs  =    wa_bsak-bukrs.
        wa_bsik-lifnr  =    wa_bsak-lifnr.
        wa_bsik-augbl  =    wa_bsak-augbl.
        wa_bsik-zuonr  =    wa_bsak-zuonr.
        wa_bsik-gjahr  =    wa_bsak-gjahr.
        wa_bsik-belnr  =    wa_bsak-belnr.
        wa_bsik-buzei  =    wa_bsak-buzei.
        wa_bsik-budat  =    wa_bsak-budat.
        wa_bsik-bldat  =    wa_bsak-bldat.
        wa_bsik-xblnr  =    wa_bsak-xblnr.
        wa_bsik-blart  =    wa_bsak-blart.
        wa_bsik-shkzg  =    wa_bsak-shkzg.
        wa_bsik-dmbtr  =    wa_bsak-dmbtr.
        wa_bsik-sgtxt  =    wa_bsak-sgtxt .
        APPEND wa_bsik TO it_bsik.
        CLEAR:wa_bsik.
      ENDLOOP.
      IF it_bsik IS NOT INITIAL .
        SELECT lifnr bukrs gjahr umsav
               FROM lfc1
              INTO TABLE it_lfc1 FOR ALL ENTRIES IN  it_bsik
              WHERE
                    lifnr  EQ it_bsik-lifnr AND
                    bukrs  EQ it_bsik-bukrs AND
                    gjahr  EQ it_bsik-gjahr.
        SELECT  * FROM t003t
          INTO TABLE it_t003
          FOR ALL ENTRIES IN it_bsik
            WHERE blart = it_bsik-blart AND
                  spras = 'EN'.
    *&Bindu........................................
          select bukrs  "Company Code
                 belnr  "Document Number
                 gjahr  "Fiscal Year
                 buzei  "Line item
                 koart  "Account Type
                 hkont  "General Ledger Account
            from bseg into TABLE it_bseg
                      FOR ALL ENTRIES IN it_bsik
                      WHERE belnr eq it_bsik-belnr and
                            bukrs in s_bukrs and
                            gjahr eq p_gjahr and
                            BUZEI eq it_bsik-buzei.
      ENDIF.
      SORT it_bsik BY lifnr.
      DATA:c,
            l_dmbtr type p DECIMALS 2.
    DATA:v1(15),
         v2(3).
    DATA:v_umsav(18).
    DATA v_fbal TYPE umsav.
      LOOP AT it_bsik INTO wa_bsik.
            READ TABLE it_lfc1 INTO wa_lfc1 WITH KEY lifnr = wa_bsik-lifnr
                                                 bukrs = wa_bsik-bukrs
                                                 gjahr = wa_bsik-gjahr.
        if sy-subrc = 0.
    at FIRST.
    v_umsav = wa_lfc1-umsav.
      SPLIT v_umsav at '.' INTO v1 v2.
          wa_all-LTEXT = 'Opening Balance'.
          IF v2+2(1) = '-'.
          wa_all-cre = wa_lfc1-umsav.
          ELSE.
            wa_all-deb = wa_lfc1-umsav.
          ENDIF.
           wa_all-bal = wa_lfc1-umsav.
           v_fbal = wa_all-bal.
    APPEND wa_all to it_all.
    CLEAR wa_all.
    endat.
    endif.
        AT NEW lifnr.
          c = 0.
        ENDAT.
        wa_all-lifnr = wa_bsik-lifnr.
        wa_all-zuonr = wa_bsik-zuonr.
        wa_all-xblnr = wa_bsik-xblnr.
        wa_all-belnr = wa_bsik-belnr.
        wa_all-blart = wa_bsik-blart.
        wa_all-bldat = wa_bsik-bldat.
        wa_all-budat = wa_bsik-budat.
    *&Bindu............
      READ TABLE it_bseg into wa_bseg WITH KEY belnr = wa_bsik-belnr
                                               buzei = wa_bsik-buzei."Bindu.......
    if sy-subrc = 0.
        wa_all-hkont = wa_bseg-hkont. "Bindu.....
    endif.
        IF wa_bsik-shkzg = 'S'.
          wa_all-deb = wa_bsik-dmbtr.
        ELSEIF wa_bsik-shkzg = 'H'.
          wa_all-cre = wa_bsik-dmbtr.
        ENDIF.
        READ TABLE  it_t003 INTO wa_t003 WITH KEY blart = wa_bsik-blart.
        IF sy-subrc = 0.
          wa_all-ltext = wa_t003-ltext.
        ENDIF.
    *    READ TABLE it_lfc1 INTO wa_lfc1 WITH KEY lifnr = wa_bsik-lifnr
    *                                             bukrs = wa_bsik-bukrs
    *                                             gjahr = wa_bsik-gjahr.
    *break naidu.
        IF sy-subrc = 0.
    *      IF c = 0.
    *        clear:l_dmbtr.
    *        wa_all-opbal = wa_lfc1-umsav.
    *        c = c + 1.
    *        IF wa_bsik-shkzg = 'S'.
    *          wa_all-bal =  wa_all-opbal + wa_bsik-dmbtr.
    *        ELSEIF wa_bsik-shkzg = 'H'.
    *          wa_all-bal =  wa_all-opbal - wa_bsik-dmbtr.
    *        ENDIF.
            l_dmbtr = wa_all-bal.
    *      ELSE.
    *          wa_all-bal =  l_dmbtr + wa_bsik-dmbtr.
    *        ELSEIF wa_bsik-shkzg = 'H'.
    *          wa_all-bal = l_dmbtr - wa_bsik-dmbtr.
    *        ENDIF.
          ENDIF.
    *  IF wa_bsik-shkzg = 'S'.
    *          wa_all-bal =  wa_all-opbal + wa_bsik-dmbtr.
    *        ELSEIF wa_bsik-shkzg = 'H'.
    *          wa_all-bal =  wa_all-opbal - wa_bsik-dmbtr.
    *        ENDIF.
    if v_fbal is NOT INITIAL.
    wa_all-bal = v_fbal + wa_all-deb - wa_all-cre.
    CLEAR:v_fbal.
    else.
    wa_all-bal = v_bal + wa_all-deb - wa_all-cre.
        ENDIF.
        wa_all-augbl = wa_bsik-augbl.
        wa_all-sgtxt = wa_bsik-sgtxt.
    *v_balance  = wa_all-bal.
    APPEND wa_all TO it_all.
    v_bal = wa_all-bal.
    CLEAR :wa_all.
    *& Closing Balence.................
        at last.
       wa_all-LTEXT = 'Closing Balance'.
    *      IF .
          wa_all-BAL = v_bal.
    APPEND wa_all to it_all.
    CLEAR wa_all.
    *      ENDIF.
    endat.
      ENDLOOP.
    ENDFORM.                    " PROCESS_DATA
    *&      Form  DISPLAY
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM display .
      DATA : ls_layout  TYPE  slis_layout_alv.
      PERFORM create_fldcat.
      ls_layout-expand_all = 'X'.
      ls_layout-colwidth_optimize = 'X'.
      ls_layout-expand_fieldname = 'X'.
      ls_layout-zebra = 'X'.
    if it_all is initial .
        wa_all-LTEXT = 'Opening Balance'.
        wa_all-bal = t_balence-LC_BAL.
        wa_all-lifnr = s_lifnr-low.
        APPEND wa_all to it_all.
        ENDIF.
      IF it_all IS NOT INITIAL.
            CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program = sy-repid
            is_layout          = ls_layout
            it_fieldcat        = gt_fldcat
            i_save             = 'X'
          TABLES
            t_outtab           = it_all[]
          EXCEPTIONS
            program_error      = 1
            OTHERS             = 2.
      ELSE.
        MESSAGE 'There is no Data for the given selection screen' TYPE 'I' DISPLAY LIKE 'E'.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " DISPLAY
    *&      Form  CREATE_FLDCAT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM create_fldcat .
      PERFORM : append_val USING 'LIFNR'       'IT_ALL' 'vendor'  '' '' 'X' ' '.
      PERFORM : append_val USING 'HKONT'       'IT_ALL' 'G/L Acc'  '' '' 'X' ' '.
      PERFORM : append_val USING 'ZUONR'       'IT_ALL' 'account'  '' '' '' ''.
      PERFORM : append_val USING 'XBLNR'       'IT_ALL' 'number'  '' '' 'X' ''.
      PERFORM : append_val USING 'BELNR'       'IT_ALL' 'ref no'  '' '' 'X' ''.
      PERFORM : append_val USING 'BLART'       'IT_ALL' 'type'  '' '' 'X' ''.
      PERFORM : append_val USING 'LTEXT'       'IT_ALL' 'type text'  '' '' 'X' ''.
      PERFORM : append_val USING 'BLDAT'       'IT_ALL' 'doc date'  '' '' 'X' ''.
      PERFORM : append_val USING 'BUDAT'       'IT_ALL' 'post date'  '' '' 'X' ''.
      PERFORM : append_val USING 'OPBAL'       'IT_ALL' 'op balance'  '' '' '' ''.
      PERFORM : append_val USING 'DEB'         'IT_ALL' 'debit' '' '' '' ''.
      PERFORM : append_val USING 'CRE'         'IT_ALL' 'credit'  '' '' '' ''.
      PERFORM : append_val USING 'BAL'         'IT_ALL' 'balance'  '' '' '' ''.
      PERFORM : append_val USING 'AUGBL'       'IT_ALL' 'clr doc'  '' '' 'X' ''.
      PERFORM : append_val USING 'SGTXT'       'IT_ALL' 'text '  '' '' 'X' ''.
    ENDFORM.                    " CREATE_FLDCAT
    *&      Form  APPEND_VAL
    *       text
    *      -->P_0578   text
    *      -->P_0579   text
    *      -->P_TEXT_010  text
    *      -->P_0581   text
    *      -->P_0582   text
    *      -->P_0583   text
    FORM append_val  USING    p_a
                              p_b
                              p_c
                              p_d
                              p_e
                              p_f
                              p_g.
      CLEAR gs_fldcat.
      gs_fldcat-fieldname  = p_a.
      gs_fldcat-tabname    = p_b.
      gs_fldcat-seltext_m  = p_c.
      gs_fldcat-qfieldname = p_d.
      gs_fldcat-datatype   = p_e.
      gs_fldcat-no_zero    = p_f.
      gs_fldcat-do_sum     = p_g.
      APPEND gs_fldcat TO gt_fldcat.
    ENDFORM.                    " APPEND_VAL
    This is working for single vendor.
    Now my problem is Opening & closing balance should be displayed for multiple vendors.
    Please suggest me.
    Thanks in advance.

    Hi Friends,
    I have an issue. This is my code.
    *& Report  ZVEN_OPEN_CLOSE_BAL
    REPORT  ZVEN_OPEN_CLOSE_BAL.
    *& Report  ZVEN_OPEN_CLOSE_BAL
    TABLES:lfa1,bsik.
    TYPES: BEGIN OF ty_bsik,
           bukrs TYPE bsik-bukrs,
           lifnr TYPE bsik-lifnr,
           augbl TYPE bsik-augbl,
           zuonr TYPE bsik-zuonr,
           gjahr TYPE bsik-gjahr,
           xblnr TYPE bsik-xblnr,
           belnr TYPE bsik-belnr,
           buzei TYPE bsik-buzei,
           blart TYPE bsik-blart,
           bldat TYPE bsik-bldat,
           budat TYPE bsik-budat,
           shkzg TYPE bsik-shkzg,
           dmbtr TYPE bsik-dmbtr,
    *       bal   TYPE char30,
           sgtxt TYPE bsik-sgtxt,
           END OF ty_bsik.
    TYPES: BEGIN OF ty_bsak,
           bukrs TYPE bsik-bukrs,
           lifnr TYPE bsak-lifnr,
           augbl TYPE bsak-augbl,
           zuonr TYPE bsak-zuonr,
           gjahr TYPE bsik-gjahr,
           belnr TYPE bsak-belnr,
           buzei TYPE bsik-buzei,
           budat TYPE bsak-budat,
           bldat TYPE bsak-bldat,
           xblnr TYPE bsak-xblnr,
           blart TYPE bsak-blart,
           shkzg TYPE bsak-shkzg,
           dmbtr TYPE bsik-dmbtr,
    *      shkzg1 TYPE bsak-shkzg,
           sgtxt TYPE bsak-sgtxt,
           END OF ty_bsak.
    TYPES: BEGIN OF ty_lfc1,
            lifnr TYPE lfc1-lifnr,
            bukrs TYPE lfc1-bukrs,
            gjahr TYPE lfc1-gjahr,
            umsav TYPE lfc1-umsav,
            END OF ty_lfc1.
    TYPES: BEGIN OF ty_all,
            lifnr TYPE bsik-lifnr,
            zuonr TYPE bsik-zuonr,
            xblnr TYPE bsik-xblnr,
            belnr TYPE bsik-belnr,
            hkont TYPE bseg-hkont,
            blart TYPE bsik-blart,
            ltext TYPE text20,
            bldat TYPE bsik-bldat,
            budat TYPE bsik-budat,
            opbal TYPE p DECIMALS 2,
            deb   TYPE p DECIMALS 2 ,"bsik-dmbtr,
            cre   TYPE p DECIMALS 2,"bsik-dmbtr,
            bal   TYPE p DECIMALS 2,
            augbl TYPE bsik-augbl,
            sgtxt TYPE bsik-sgtxt,
          END OF ty_all.
    TYPE-POOLS: slis.
    DATA:  t_layout   TYPE slis_layout_alv,
           s_fieldtab TYPE slis_fieldcat_alv,
           t_fieldtab TYPE slis_t_fieldcat_alv,
           wa_header TYPE slis_listheader,
           it_header TYPE  slis_t_listheader.
    DATA:it_bsik TYPE TABLE OF ty_bsik,
         it_bsak TYPE TABLE OF ty_bsak,
         it_all  TYPE TABLE OF ty_all,
         it_lfc1 TYPE TABLE OF ty_lfc1,
         it_t003 TYPE TABLE OF t003t,
         wa_bsik TYPE ty_bsik,
         wa_bsak TYPE ty_bsak,
         wa_all  TYPE ty_all,
         wa_lfc1 TYPE ty_lfc1,
         wa_t003 TYPE t003t.
    DATA:  gt_fldcat    TYPE slis_t_fieldcat_alv,
           gs_fldcat    TYPE slis_fieldcat_alv,
           gs_layout    TYPE slis_layout_alv,
           gv_save      TYPE c VALUE 'X'.
    types :BEGIN OF ty_bseg,
            BUKRS TYPE BUKRS,
            BELNR  TYPE BELNR_D,
            GJAHR  TYPE GJAHR,
            BUZEI  TYPE BUZEI,
            koart type koart,
            HKONT TYPE HKONT,
           END OF ty_bseg.
    DATA: it_bseg type TABLE OF ty_bseg,
          wa_bseg type ty_bseg.
      data t_balence TYPE TABLE OF BAPI3008_3 WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr,
                     s_bukrs FOR bsik-bukrs,
                     s_budat FOR bsik-budat OBLIGATORY.
    PARAMETERS : p_gjahr TYPE bsik-gjahr OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM process_data.
      PERFORM display.
    *&      Form  GET_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM get_data .
      break naidu.
      SELECT  bukrs
              lifnr
              augbl
              zuonr
              gjahr
              xblnr
              belnr
              buzei
              blart
              bldat
              budat
              shkzg
              dmbtr
              sgtxt FROM bsik
              INTO TABLE it_bsik
              WHERE lifnr IN s_lifnr AND
                    bukrs IN s_bukrs AND
                    budat IN s_budat AND
                    gjahr = p_gjahr .
      SELECT bukrs
             lifnr
             augbl
             zuonr
             gjahr
             belnr
             buzei
             budat
             bldat
             xblnr
             blart
             shkzg
             dmbtr
             sgtxt FROM bsak
             INTO TABLE it_bsak
             WHERE lifnr IN s_lifnr AND
                   bukrs IN s_bukrs AND
                   budat IN s_budat AND
                   gjahr = p_gjahr .
    if it_bsik is INITIAL and it_bsak  is INITIAL.
    *DATA  v_date type budat.
    *data :year(4),
    *      month(2),
    *      date(2).
    *  year  = s_budat-low+0(4).
    *  date  = s_budat-low+6(2).
    *  month = s_budat-low+4(2).
    *  month = month - 01.
    *CONCATENATE year month date INTO v_date .
    *  SELECT  bukrs
    *          lifnr
    *          augbl
    *          zuonr
    *          gjahr
    *          xblnr
    *          belnr
    *          buzei
    *          blart
    *          bldat
    *          budat
    *          shkzg
    *          dmbtr
    *          sgtxt FROM bsik
    *          INTO TABLE it_bsik
    *          WHERE lifnr IN s_lifnr AND
    *                bukrs in s_bukrs and
    *                budat eq v_date AND
    *                gjahr = p_gjahr .
    *  SELECT bukrs
    *         lifnr
    *         augbl
    *         zuonr
    *         gjahr
    *         belnr
    *         buzei
    *         budat
    *         bldat
    *         xblnr
    *         blart
    *         shkzg
    *         dmbtr
    *         sgtxt FROM bsak
    *         INTO TABLE it_bsak
    *         WHERE lifnr IN s_lifnr AND
    *               bukrs IN s_bukrs AND
    *               budat eq v_date AND
    *               gjahr = p_gjahr .
      CALL FUNCTION 'BAPI_AP_ACC_GETKEYDATEBALANCE'
        EXPORTING
          companycode        = s_bukrs-low
          vendor             = s_lifnr-low
          keydate            = s_budat-low
    *     BALANCESPGLI       = ' '
    *     NOTEDITEMS         = ' '
    *   IMPORTING
    *     RETURN             =
        TABLES
          keybalance         = t_balence
      endif.
    ENDFORM.                    " GET_DATA
    *&      Form  PROCESS_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM process_data .
      DATA:v_bal TYPE netpr.
      LOOP AT it_bsak INTO wa_bsak.
        wa_bsik-bukrs  =    wa_bsak-bukrs.
        wa_bsik-lifnr  =    wa_bsak-lifnr.
        wa_bsik-augbl  =    wa_bsak-augbl.
        wa_bsik-zuonr  =    wa_bsak-zuonr.
        wa_bsik-gjahr  =    wa_bsak-gjahr.
        wa_bsik-belnr  =    wa_bsak-belnr.
        wa_bsik-buzei  =    wa_bsak-buzei.
        wa_bsik-budat  =    wa_bsak-budat.
        wa_bsik-bldat  =    wa_bsak-bldat.
        wa_bsik-xblnr  =    wa_bsak-xblnr.
        wa_bsik-blart  =    wa_bsak-blart.
        wa_bsik-shkzg  =    wa_bsak-shkzg.
        wa_bsik-dmbtr  =    wa_bsak-dmbtr.
        wa_bsik-sgtxt  =    wa_bsak-sgtxt .
        APPEND wa_bsik TO it_bsik.
        CLEAR:wa_bsik.
      ENDLOOP.
      IF it_bsik IS NOT INITIAL .
        SELECT lifnr bukrs gjahr umsav
               FROM lfc1
              INTO TABLE it_lfc1 FOR ALL ENTRIES IN  it_bsik
              WHERE
                    lifnr  EQ it_bsik-lifnr AND
                    bukrs  EQ it_bsik-bukrs AND
                    gjahr  EQ it_bsik-gjahr.
        SELECT  * FROM t003t
          INTO TABLE it_t003
          FOR ALL ENTRIES IN it_bsik
            WHERE blart = it_bsik-blart AND
                  spras = 'EN'.
    *&Bindu........................................
          select bukrs  "Company Code
                 belnr  "Document Number
                 gjahr  "Fiscal Year
                 buzei  "Line item
                 koart  "Account Type
                 hkont  "General Ledger Account
            from bseg into TABLE it_bseg
                      FOR ALL ENTRIES IN it_bsik
                      WHERE belnr eq it_bsik-belnr and
                            bukrs in s_bukrs and
                            gjahr eq p_gjahr and
                            BUZEI eq it_bsik-buzei.
      ENDIF.
      SORT it_bsik BY lifnr.
      DATA:c,
            l_dmbtr type p DECIMALS 2.
    DATA:v1(15),
         v2(3).
    DATA:v_umsav(18).
    DATA v_fbal TYPE umsav.
      LOOP AT it_bsik INTO wa_bsik.
            READ TABLE it_lfc1 INTO wa_lfc1 WITH KEY lifnr = wa_bsik-lifnr
                                                 bukrs = wa_bsik-bukrs
                                                 gjahr = wa_bsik-gjahr.
        if sy-subrc = 0.
    at FIRST.
    v_umsav = wa_lfc1-umsav.
      SPLIT v_umsav at '.' INTO v1 v2.
          wa_all-LTEXT = 'Opening Balance'.
          IF v2+2(1) = '-'.
          wa_all-cre = wa_lfc1-umsav.
          ELSE.
            wa_all-deb = wa_lfc1-umsav.
          ENDIF.
           wa_all-bal = wa_lfc1-umsav.
           v_fbal = wa_all-bal.
    APPEND wa_all to it_all.
    CLEAR wa_all.
    endat.
    endif.
        AT NEW lifnr.
          c = 0.
        ENDAT.
        wa_all-lifnr = wa_bsik-lifnr.
        wa_all-zuonr = wa_bsik-zuonr.
        wa_all-xblnr = wa_bsik-xblnr.
        wa_all-belnr = wa_bsik-belnr.
        wa_all-blart = wa_bsik-blart.
        wa_all-bldat = wa_bsik-bldat.
        wa_all-budat = wa_bsik-budat.
    *&Bindu............
      READ TABLE it_bseg into wa_bseg WITH KEY belnr = wa_bsik-belnr
                                               buzei = wa_bsik-buzei."Bindu.......
    if sy-subrc = 0.
        wa_all-hkont = wa_bseg-hkont. "Bindu.....
    endif.
        IF wa_bsik-shkzg = 'S'.
          wa_all-deb = wa_bsik-dmbtr.
        ELSEIF wa_bsik-shkzg = 'H'.
          wa_all-cre = wa_bsik-dmbtr.
        ENDIF.
        READ TABLE  it_t003 INTO wa_t003 WITH KEY blart = wa_bsik-blart.
        IF sy-subrc = 0.
          wa_all-ltext = wa_t003-ltext.
        ENDIF.
    *    READ TABLE it_lfc1 INTO wa_lfc1 WITH KEY lifnr = wa_bsik-lifnr
    *                                             bukrs = wa_bsik-bukrs
    *                                             gjahr = wa_bsik-gjahr.
    *break naidu.
        IF sy-subrc = 0.
    *      IF c = 0.
    *        clear:l_dmbtr.
    *        wa_all-opbal = wa_lfc1-umsav.
    *        c = c + 1.
    *        IF wa_bsik-shkzg = 'S'.
    *          wa_all-bal =  wa_all-opbal + wa_bsik-dmbtr.
    *        ELSEIF wa_bsik-shkzg = 'H'.
    *          wa_all-bal =  wa_all-opbal - wa_bsik-dmbtr.
    *        ENDIF.
            l_dmbtr = wa_all-bal.
    *      ELSE.
    *          wa_all-bal =  l_dmbtr + wa_bsik-dmbtr.
    *        ELSEIF wa_bsik-shkzg = 'H'.
    *          wa_all-bal = l_dmbtr - wa_bsik-dmbtr.
    *        ENDIF.
          ENDIF.
    *  IF wa_bsik-shkzg = 'S'.
    *          wa_all-bal =  wa_all-opbal + wa_bsik-dmbtr.
    *        ELSEIF wa_bsik-shkzg = 'H'.
    *          wa_all-bal =  wa_all-opbal - wa_bsik-dmbtr.
    *        ENDIF.
    if v_fbal is NOT INITIAL.
    wa_all-bal = v_fbal + wa_all-deb - wa_all-cre.
    CLEAR:v_fbal.
    else.
    wa_all-bal = v_bal + wa_all-deb - wa_all-cre.
        ENDIF.
        wa_all-augbl = wa_bsik-augbl.
        wa_all-sgtxt = wa_bsik-sgtxt.
    *v_balance  = wa_all-bal.
    APPEND wa_all TO it_all.
    v_bal = wa_all-bal.
    CLEAR :wa_all.
    *& Closing Balence.................
        at last.
       wa_all-LTEXT = 'Closing Balance'.
    *      IF .
          wa_all-BAL = v_bal.
    APPEND wa_all to it_all.
    CLEAR wa_all.
    *      ENDIF.
    endat.
      ENDLOOP.
    ENDFORM.                    " PROCESS_DATA
    *&      Form  DISPLAY
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM display .
      DATA : ls_layout  TYPE  slis_layout_alv.
      PERFORM create_fldcat.
      ls_layout-expand_all = 'X'.
      ls_layout-colwidth_optimize = 'X'.
      ls_layout-expand_fieldname = 'X'.
      ls_layout-zebra = 'X'.
    if it_all is initial .
        wa_all-LTEXT = 'Opening Balance'.
        wa_all-bal = t_balence-LC_BAL.
        wa_all-lifnr = s_lifnr-low.
        APPEND wa_all to it_all.
        ENDIF.
      IF it_all IS NOT INITIAL.
            CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program = sy-repid
            is_layout          = ls_layout
            it_fieldcat        = gt_fldcat
            i_save             = 'X'
          TABLES
            t_outtab           = it_all[]
          EXCEPTIONS
            program_error      = 1
            OTHERS             = 2.
      ELSE.
        MESSAGE 'There is no Data for the given selection screen' TYPE 'I' DISPLAY LIKE 'E'.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " DISPLAY
    *&      Form  CREATE_FLDCAT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM create_fldcat .
      PERFORM : append_val USING 'LIFNR'       'IT_ALL' 'vendor'  '' '' 'X' ' '.
      PERFORM : append_val USING 'HKONT'       'IT_ALL' 'G/L Acc'  '' '' 'X' ' '.
      PERFORM : append_val USING 'ZUONR'       'IT_ALL' 'account'  '' '' '' ''.
      PERFORM : append_val USING 'XBLNR'       'IT_ALL' 'number'  '' '' 'X' ''.
      PERFORM : append_val USING 'BELNR'       'IT_ALL' 'ref no'  '' '' 'X' ''.
      PERFORM : append_val USING 'BLART'       'IT_ALL' 'type'  '' '' 'X' ''.
      PERFORM : append_val USING 'LTEXT'       'IT_ALL' 'type text'  '' '' 'X' ''.
      PERFORM : append_val USING 'BLDAT'       'IT_ALL' 'doc date'  '' '' 'X' ''.
      PERFORM : append_val USING 'BUDAT'       'IT_ALL' 'post date'  '' '' 'X' ''.
      PERFORM : append_val USING 'OPBAL'       'IT_ALL' 'op balance'  '' '' '' ''.
      PERFORM : append_val USING 'DEB'         'IT_ALL' 'debit' '' '' '' ''.
      PERFORM : append_val USING 'CRE'         'IT_ALL' 'credit'  '' '' '' ''.
      PERFORM : append_val USING 'BAL'         'IT_ALL' 'balance'  '' '' '' ''.
      PERFORM : append_val USING 'AUGBL'       'IT_ALL' 'clr doc'  '' '' 'X' ''.
      PERFORM : append_val USING 'SGTXT'       'IT_ALL' 'text '  '' '' 'X' ''.
    ENDFORM.                    " CREATE_FLDCAT
    *&      Form  APPEND_VAL
    *       text
    *      -->P_0578   text
    *      -->P_0579   text
    *      -->P_TEXT_010  text
    *      -->P_0581   text
    *      -->P_0582   text
    *      -->P_0583   text
    FORM append_val  USING    p_a
                              p_b
                              p_c
                              p_d
                              p_e
                              p_f
                              p_g.
      CLEAR gs_fldcat.
      gs_fldcat-fieldname  = p_a.
      gs_fldcat-tabname    = p_b.
      gs_fldcat-seltext_m  = p_c.
      gs_fldcat-qfieldname = p_d.
      gs_fldcat-datatype   = p_e.
      gs_fldcat-no_zero    = p_f.
      gs_fldcat-do_sum     = p_g.
      APPEND gs_fldcat TO gt_fldcat.
    ENDFORM.                    " APPEND_VAL
    This is working for single vendor.
    Now my problem is Opening & closing balance should be displayed for multiple vendors.
    Please suggest me.
    Thanks in advance.

  • Triggering a sub work flow for multiple users at same time.

    I have a scenario in which I have created sub workflow as an activity for approval process. This sub work flow should be triggered for multiple users at the same time and their decison is independent of each other.
    This is like creating multipe instance of the same sub work flow and then the sub work flow runs indepedently as a new work flow for each of the approver and the process is completeded for approver independently.
    How can this be achieved?

    Tyr to do like this,
    1. First include the subworkflow in the main workflow template.
    2. Now include standard Block Step in the main workflow template.
    3. In the block select the block type as ParForEach.
    4. Before doing the 3rd point make sure that all the agents for whom you want whom you want to initiate the workflow, populate them in a Multiline conatiner element.
    5. Once completing 3rd and 4th points open the block step under the tab ParallelProcessing  assign the multiline container element name in the   for e;g if the multi line container element name is COSTCENTER then do the binding like below. the conatiner element COSTCENTERLINE is created by default once you include the multi line conatiner element under parller processing tab.
    &COSTCENTER[&_WF_PARFOREACH_INDEX&]&   -------->     &_COSTCENTER_LINE&
    Now assign the agent of the subworkflow as COSTCENTERLINE , imean if suppose you have 3 entries in the internal table then three separate and for three different agents the workflow is instantiated.

Maybe you are looking for