Script external subroutine for multiple fileds display

Hi,
can anybody tell
how to write external subroutine in script.
i want to display multiple fields data in script by using external subroutine.
Regards,
Kumar.

HI,
You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
Syntax in a form window:
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
/: ENDPERFORM
INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
ENDFORM.
Definition in the SAPscript form:
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM

Similar Messages

  • Requirement to maintain select-options for multiple fileds in webdynpro aba

    Hello Gurus,
    We have a requirement to maintain select-options for multiple fileds in webdynpro abap.
    now we are able to create select-options for a single field using wdr_select_options componet usage.
    how can we achive this select-options feature for multiple fields.
    Could anyone please suggest solutions?
    and if possible send me the sample code for this requirement.
    Thanks in Advance for your replies.
    Regards,
    Shyam

    Hi,
    Nothing different for more fields, same. some declaration changes.
    For example code i am using.. in WDDOINIT method.
    TYPES:
        fiscal_year TYPE RANGE OF GJAHR,
        S_KUNNR TYPE RANGE OF J_3RS_KUNNR,
        S_VKORG TYPE RANGE OF VKORG_RAN,
        status type PVWTY-RETPA,
        ty_r_date TYPE RANGE OF s_date,
        ty_s_date TYPE LINE OF ty_r_date.
    DATA lo_interfacecontroller TYPE REF TO iwci_wdr_select_options .
      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_cmp_sel_opt( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
      lo_cmp_usage->create_component( ).
    ENDIF.
    * Reference variable used instantiate the select-options component
      DATA
        lr_cmp_usage TYPE REF TO if_wd_component_usage.
    * Variables used to create the select-options fields and
    * define its initial values
      DATA:
        lr_field TYPE REF TO data,
        ls_date  TYPE ty_s_date.
      FIELD-SYMBOLS:
        <fs_field> TYPE ANY,
        <fs_range> TYPE INDEX TABLE.
    * Instantiate the select-options component
      lr_cmp_usage = wd_this->wd_cpuse_cmp_sel_opt( ).
      IF lr_cmp_usage->has_active_component( ) IS INITIAL.
        lr_cmp_usage->create_component( ).
      ENDIF.
      lo_interfacecontroller =   wd_this->wd_cpifc_cmp_sel_opt( ).
    wd_this->m_sel_opt = lo_interfacecontroller->init_selection_screen( ).
    data : vhelp type wdy_md_value_help_mode_enum .
    * Sets the helper reference
      wd_this->m_sel_opt1 = wd_this->wd_cpifc_cmp_sel_opt( ).
      wd_this->m_helper  = wd_this->m_sel_opt1->init_selection_screen( ).
    * Hide the standard select-options components.
      wd_this->m_helper->set_global_options(
        i_display_btn_cancel = abap_false
        i_display_btn_check  = abap_false
        i_display_btn_reset  = abap_false
        i_display_btn_execute  = abap_false
      lr_field = wd_this->m_helper->create_range_table( `KUNNR` ).
      wd_this->m_helper->add_selection_field(
        i_id           = `KUNNR`
        I_DESCRIPTION  = 'Customer Code'
    *    i_within_block = `BL01`
        it_result      = lr_field ).
      FREE lr_field.
      lr_field = wd_this->m_helper->create_range_table( `VKORG` ).
      wd_this->m_helper->add_selection_field(
        i_id           = `VKORG`
        I_DESCRIPTION  = 'Sales Organization'
    *    i_within_block = `BL01`
        it_result      = lr_field ).
      FREE lr_field.
    Go through this..
    http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproABAP-Complexselect-optionscomponent+usages
    Cheers,
    Kris.

  • Can we create single External Table for multiple files?

    HI,
    Can we create External table for multiple files? Could anyone please explain it.
    Thanks and regards
    Gowtham Sen.

    to merge 16 files having same structureWell, if files have the same structure, as per the reading of the example from the following documentation, you can create one external table for all your files :
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#i1007480
    Nicolas.

  • Using HR_INFOTYPE_OPERATION in external subroutine for Dynamic Actions

    Hi,
    I am calling an external subroutine in the Dynamic Actions of an Infotype. In this external subroutine, I am using HR_INFOTYPE_OPERATION to modify OTHER records of the same Infotype number.
    However, when I tried to trigger the Dynamic Actions in PA30, the other infotypes get modified as intended. But when I refreshed the PA30 screen, the changes were reversed back as if the HR_INFOTYPE_OPERATION were not carried out at all. I have COMMIT WORK after the HR_INFOTYPE_OPERATION, refreshed the buffer. But it doesn't seem to work.
    My question is: Can i use HR_INFOTYPE_OPERATION in an external subroutine which is called during dynamic actions? As I have some complicated logic, I do not want to embed the coding in the Dynamic Actions. Is there a way for HR_INFOTYPE_OPERATION to work in the external subroutine with the changes being committed to the database?
    Thank you.

    Hi,
    I remember the same problem being faced by some of the forum members.
    Suresh Datti had replied that "Call the subroutine in a nother program using a SUBMIT statement. This will create two sessions and will update the DB". This was working fine for the users.
    Hope you can try this.
    Just call a program using SUBMIT statement and code your form routine inside that.
    Hope this helps you.
    Regards,
    Subbu.

  • Script to Filter for Multiple ComboBox

    Hello,
    I am trying to create two combo boxes, company and contact.
    When company selected only contacts for that company display in the
    contact combo box. I created the script below but it does not work.
    Please look at the script and tell me what if I miss out any thing?
    TIA,
    private function
    Jobs_CompanyIDLookup_result(event:ResultEvent):void
    this.Jobs_CompanyID.dataProvider = event.result;
    var compID:Object = new Object();
    compID.CompanyName = "Select one";
    compID.CompanyID = 0;
    this.Jobs_CompanyID.dataProvider.addItemAt(compID, 0);
    if (this._key == null){
    Jobs_CompanyID.selectedIndex = 0;
    }else
    this.Jobs_CompanyID.selectedItem = originalJobs_CompanyID;
    private function
    Jobs_ContactIDLookup_result(event:ResultEvent):void
    this.Jobs_ContactID.dataProvider = event.result;
    var contID:Object = new Object();
    contID.FullName = "Select one";
    contID.ContactID = 0;
    this.Jobs_ContactID.dataProvider.addItemAt(contID, 0);
    if (this._key == null){
    Jobs_ContactID.selectedIndex = 0;
    }else
    this.Jobs_ContactID.selectedItem = originalJobs_ContactID;
    Jobs_ContactID.selectedItem.CompanyID =
    Jobs_CompanyID.selectedItem.CompanyID;
    }

    Your script works perfectly well! However, I think that maybe it could be faster if modified as below (in bold), as recommended in the [AppleScript Language Guide|http://developer.apple.com/mac/library/documentation/AppleScript/Conceptu al/AppleScriptLangGuide/introduction/ASLRintro.html#//appleref/doc/uid/TP40000983-CH208-SW1] (at the end of [this section|http://developer.apple.com/mac/library/documentation/AppleScript/Concep tual/AppleScriptLangGuide/reference/ASLRclasses.html#//appleref/doc/uid/TP40000983-CH1g-BBCDBHIE] about lists) for larger lists:
    set theListOfTitles to {"John", "John and his mother", "Mary and me"} -- just an example
    *set theTitles to a reference to theListOfTitles*
    tell application "iPhoto"
    repeat with currentTitle in theTitles
    set currentListOfPhotos to (photos whose title is currentTitle)
    repeat with k from 1 to the length of currentListOfPhotos
    set rating of item k of currentListOfPhotos to 2
    end repeat
    end repeat
    end tell
    The same for the script I sent to you:
    set theListOfTitles to {"John", "John and his mother", "Mary and me"} -- just an example
    *set theTitles to a reference to theListOfTitles*
    set theListOfPhotos to {}
    set thePhotos to a reference to theListOfPhotos
    tell application "iPhoto"
    repeat with currentTitle in theTitles
    set currentListOfPhotos to (photos whose title is currentTitle)
    repeat with k from 1 to the length of currentListOfPhotos
    set theRating to rating of item k of currentListOfPhotos
    set theDate to date of item k of currentListOfPhotos
    copy currentTitle & " (" & theDate & ") — " & theRating to the end of thePhotos
    end repeat
    end repeat
    end tell
    theListOfPhotos --> {"John (Thursday, April 24, 2008 5:55:07 PM) — 4", "John (Saturday, August 12, 2006 3:41:45 PM) — 3", "John and his mother (Tuesday, July 8, 2008 12:43:17 PM) — 4", Mary and me (Friday, August 14, 2009 12:36:00 AM) — 3"}
    Message was edited by: Pierre L.

  • Setup drop-box folder on external drive for multiple Macs

    Greetings,
    I have a classroom full of photography students who need to turn in 4GB folders with pictures in them so that the teacher can grade them. We've discussed various options for facilitating this, with the only feasible solution we can come up with being setting up an external 2TB MyBook and having the kids go up, plug in the firewire and xfer their folder to the drive (see requirements below for why this is the feasible solution). One snag with this is that I want to set it up so that when the drive mounts, it's mounted as a drop-box share to prevent plagiarism as well as kids deleting/messing with other kids' projects. The problem is that each computer has different profiles so when the drop-box is setup correctly on one computer, another computer is plugged in and the folders are wide open again. Since I obviously can't setup the permissions for each profile on each computer, what options do I have to set this up? I'm open to different ideas/different ways to accomplish this, but here are the requirements:
    - Drop-box-like functionality. Students can basically "submit" work, but only the teacher can view the files.
    - Preferably the device needs to be hardwired to the MBP using Firewire. USB is too slow and these are wireless laptops without benefit of having any ethernet jacks accessible to them. They are all connecting through an Airport Extreme and xferring 4GB files wirelessly is not an option due to class time restraints.
    - This has to work across 30 laptops with multiple user profiles.
    - If software is a suggestion, free and/or OSS is preferable since this problem will be mitigated next school year with implementation of iMacs and Xserves in this program.

    I would love how to do this as well. I actually tried moving a .mbox file out of ~/Library/Mailboxes/Mail and onto an external hard drive. Then I created an alias of the .mbox file and put it back into ~/Library/Mailboxes/Mail. No luck.

  • Default Layout for Multiple ALV displays

    Hello All,
    I have a requirement where I am displaying multiple ALV grid displays on different tabs of a screen.
    Now I have to set a default layout for each of the grids separately as they have different fields.
    Please let me know how to do it, I am using OO ALV display.
    Thanks a lot
    Ruchi

    Hi,
    According to your grid called pass the variant name
        gs_variant-report       = sy-repid.
        gs_variant-username     = sy-uname.
        gs_variant-variant      = v_vari.   " Your variant Name
        call method grid1->set_table_for_first_display 
          exporting
            is_layout                     = gs_layout
            is_variant                    = gs_variant  "<<<<<<<<<
            i_save                        = 'A'
            it_toolbar_excluding          = i_exclude[]
          changing
            it_outtab                     = i_output[]
            it_fieldcatalog               = i_fieldcat[]
          exceptions
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            others                        = 4.

  • Single power brick for multiple Cinema displays?

    I've got a client with 2 30" displays and 2 23" displays (yea, and he's wanting to add more). The big issue I'm running into is that I don't want to have 6 power bricks under his desk, due to electrical draw for the conversion to DC power. Is there anything out there which would power multiple displays?

    There's no reason that one big brick would use any less power than six small bricks running the same displays.

  • Move Logic 9 to External Drive for Multiple Computers

    I'm looking for advice on moving ALL my Logic-9 data & settings & plugins to an external HDD, so I can seamlessly move between two different computers: a 2010 MBP with OSx10.6.8 + Logic 9.1.7 and a MacPro with OSx10.8.5 + Logic 9.1.8 (different Logic versions because different OSx’s?). I researched and learned plenty but found nothing consolidated into one thread. Blending various --sometimes contradictory-- instructions, I moved a lot & all works so far, but I wonder if I’ve moved too much or not enough. I took 8+ hours (very methodically) to get this to work, but had I found this already written-up, I would have taken only a couple hours. I hope my experience might help others (if I’m over-posting I apologize).
    Both computers are running Logic 9, with software instruments: Addictive Drums 1.5.2, Kontakt 5.0.1 + Mojo Horns, and Bass Station 1.6.0. , as well as the plugin effects: iZotope Nectar  1.1.4, Ozone 5.0.4., Insight 1.02, Alloy 2.0.2, Focusrite Plugin Suite, Midnight Plugin Suite. Before starting the move I opened Logic on each computer and did the “Download Additional Content” to download everything available; funny thing is… the laptop ended up with 102 [Apple Loops or Garageband?] files while the desktop came out with 104. Also, I had to unhide my “User/Library” folder which Mountain Lion hides, using one of the methods described in other postings.
    Here’s a step-by-step of what I did so far:
    1) Save every project’s assets (audio, etc) within its project folder.
    2) Copy the “EXS Factory Samples” folder from  Laptop HD/Library/Application Support/Logic/  to the ExternalHDD. I created a symlink of this folder, and put the symlink back in the original Laptop HD/Library/Application Support/Logic/  folder, so Logic will be pointed to the ExternalHDD. I renamed the original folder in the laptop to “EXS Factory Samples MOVED” rather than deleting it (until I’m sure it’s totally safe). I renamed the “EXS Factory Samples symlink” to “EXS Factory Samples” so Logic will think it is the original folder. I followed this same symlink-&-rename method for all the rest of my transfers that followed. 3) Move the “Sampler Files” folder from  Laptop HD/Library/Application Support/Garageband/Instrument Library/Sampler ,  to ExternalHDD.
    4) Transfer “Logic” folder with all my Logic projects from Laptop HD/Users/My User-Home/Music/  to ExternalHDD. 
    5) Transfer “iZotope” folder from Laptop HD/Users/My User-Home /Documents/  to ExternalHDD (this has all my presets for Alloy & Ozone), transfer “iZotope Nectar” from the same location. I also transferred the folder where I kept all my audio/midi interface & controller settings.
    6) Transfer “Apple Loops” folder, “Presets” folder, and “MIDI Configurations” from  Laptop HD/Users/My User-Home /Documents/Audio/  to ExternalHDD.  Remember that all these are done using the same symlink-rename method for safety purposes.
    7) I was afraid there may be bad consequences to transferring the entire “Logic” folder from Laptop HD/Users/My User-Home /Library/Application Support/ , so I instead transferred INDIVIDUALLY each settings-folder within Laptop HD/Users/My User-Home /Library/ Application Support/Logic/  (“Channel Strip Settings”, “Chord Grids”, “Data Management Settings”, “Key Commands”, “Plug-in Settings”, “Project Templates”, “Sampler Instruments”, “Temp”, “Undo”).  BTW, some of these folders did not exist on the desktop computer yet. 
    8)Now connect the ExternalHDD to the desktop computer and copy all the same symlinks that  were created that ExternalHDD, and paste them each into their respective places on the desktop computer. Use the same symlink-rename method just-in-case. In some cases I had to create folders that did not yet exist.
    9) Trash the no-longer-necessary symlinks that are still on the ExternalHDD.
    Although I consolidated lots for this write-up, DO ALL THESE STEP-BY-STEP,  TESTING THAT EVERYTHING WORKS AT EACH STEP.
    Question: Should I also transfer some other folders from [Laptop HD/Users/My User-Home /Library/ Application Support/]? In there lie more folders called Addictive Drums, iZotope, Focusrite-SaffirePro24DSP, Native Instruments, Novation, "LogicLoopmasters sample library", etc. that I wonder about, because the appear to include settings files as well as data files. Perhaps just copy paste some of these settings from one computer to the other? All suggestions & experiences appreciated!
    -Chris Jones

    Hello Chris Jones,
    I just found this and I'm trying to figure it out so your post is an excellent starting point, thank you! Since you posted this in Feb are there any things you would change or you found out after doing it? And how is everything running?
    As a data point, I just added a SSD as the startup drive to an older mac pro (1,1) which is only used for Logic Pro and the speed now is amazing. Now I want to see if I can off-load the same things you have dealt with. Any additional insight will be greatly appreciated and thanks again for taking to time to document it.
    ld foster

  • Aperture library on external drive for multiple computers

    I would like to store my aperture library and all masters on an external hardrive (with a backup). Ideally I'll be able to only transport this external drive to work to edit photos and return home to my personal computer and continue where I left off. I've tried something similar but ran into problems with lost adjustments, etc and am wondering what the simplest method is that others have discovered.
    Cheers

    All the editing work is stored in the *****.aplibrary file.
    THe most obvious way will be to keep it on the external drive. If you experience it is to slow with USB you could probably have a better performance with FW800. Probably not so much with FW400.
    I have no experience with ***-aplibrary on external drive. Probably ist it to slowdown the editing.
    The best way to edit on 2 different macs will need in my opinion some extra preparation.
    Set both Aperture in exactly the same way pointing to referenced files on the external drive.
    Keep the *****.aplibrary file on the HD of the mac you are using and at the end of your work copy it somewhere (may be on the same external HD where you keep the referenced masters). Before starting to work on the second mac copy this ****.aplibrary on it.  You will need to do the same reversed to go back to the other mac.
    This will probably give you the fastest editing but you will need time to copy the  *****.aplibrary files, may be a lot of time. Even if you use a program like Tri-Backup to do the copy you will se that even if the *****-aplibrary has few changes it takes a lot of time to overwrite the older copy.
    Keep projects and libraryes as small as possible, or you will waste more time coping it compared to the more speed in editing.
    This is only my opinion, and I am not 100% sure of it. I'm giving it to you only as a suggestion you could try and see if it works for you.
    Regards
    Walter

  • Scripting Download Progress for Multiple Movie Clips?

    I'd like to insert script in the example below that would indicate the download progress of two successive movie clips on a page. Any suggestions would be much appreciated. Thank you.
    import fl.video.FLVPlayback;
    import fl.video.*;
    explainer.source="movie1.flv"
    explainer.addEventListener(VideoEvent.COMPLETE, f);
    explainer.autoPlay= true;
    explainer.volume=1.00;
    function f(e:Event){
    var myVideo:FLVPlayback = new FLVPlayback();
    myVideo.source = "movie2.flv";
    myVideo.addEventListener(VideoEvent.COMPLETE, myHomePage);
    myVideo.autoPlay=true;
    myVideo.volume=1.00;
    myVideo.skin="SkinUnderPlaySeekStop.swf";
    myVideo.skinAutoHide=true;
    myVideo.skinBackgroundColor=0x000000;
    myVideo.skinBackgroundAlpha=0.1;
    myVideo.height=405;
    myVideo.width=720;
    myVideo.x=141.2;
    myVideo.y=115.4;
    stage.addChild(myVideo);
    var urlRequest=new URLRequest("ATRMAIN.html");
    function myHomePage(eventObject:VideoEvent):void
    { navigateToURL(urlRequest, '_self');}

    the flvplayback component has bytesLoaded and bytesTotal properties.

  • Spool - Single Spool for multiple layouts

    Hi Experts,
    I am writing a Sap SCRIPT print program for multiple number of customers with different layouts. But i am getting seperate spools for different customers. There fore i need to print out all customers in a single spool.
    Can some one help me how to do this?
    Thanks
    Dany

    Hi,
    DO not call the OPEN_FORM FM multiple times for each layout.
    This should solve the problem bcz OPEN_FORM has an import parameter OPTIONS which has a NEW SPOOL field, which would be set everytime you call it.
    Best regards,
    Prashant

  • External subroutine in script

    Hi,
    Could any one tell me is that possible to use external subroutine.  Actually my script is the output of ML83. Driver program which passing the info. to script is Std one.  Is there any filed relavent to this driver program is updating when 'Service entry is revoked'.  Plz help me out... this is very urgent.
    Thanks
    Sai.

    Hi,
    'Service entry is revoked' means blocked or released..
    Sorry..I am not an expert on Service entry..But I am trying to search for the fields which you are looking for..
    Thanks,
    Naren

  • "an external subroutine required for execution can not be found."

    My application Intermittantly displays "an external subroutine required for execution not be found." The exe file is located on a local server. The missing file is a call to hostname.dll . If I run the exe file on the local machine the error message is not diplayed.
    Why?

    It sounds like an intermittent problem with the connection to your local server. It also sounds like there's a lot of traffic on the network every now and then, which is most often true on most networks.
    Are you calling this external subroutine as fast as you can? If you are, try slowing it down. Adding some delays might take the problem away.
    The second suggestion is to not be dependent on network files. If you do, add some sort of error checking capabilities to your program so that it will know to try again if the file cannot be loaded fast enough.
    Must the .dll be located on the server? If you're planning on running your application fast, you definitely want to keep everything on the local machine.
    Just my suggestions. Hope that helps.
    Shan Pin Koh

  • I've got a MacBook pro 15' running 10.6.6. I want to use an external monitor for my graphic design work running Adobe software and thought I'd try an HD TV. I ran a Mini Display to HDMI lead to the TV but the picture quality was disappointing.

    I've got a MacBook Pro 15' running 10.6.6. I want to use an external monitor for my graphic design work using Adobe software and thought I'd try an HD TV. I ran a Mini Display to HDMI lead to the TV but the picture quality was disappointing. I also tried a Mini Display to VGA lead and that wasn't much better. I tried all variations of resolutions in System prefs - Displays but nothing helped. Am I getting something wrong? Thanks all.

    In addition to pixel density, you are up against the translation driver card in the TV.
    If you read the fine print of computer-resolution-capability in the TV user guide, you will see a chart as tall as the manual page.  At the top is the smallest resolution capable, at the bottom is the full use of the 1080p in the TV.
    Mac falls into the top 25% of the page, maxing out at 1366x768 often.  This is because the TV control card is expected to do too much of the work, but is not designed for computer-monitor processing.
    I looked at the resolution charts on 2 TVs before deciding to buy a 1080p LCD monitor that has a TV interface/connector.  Computer monitor first, TV second.  But the thing is only 27 in.  Good thing TV is not as important to me as it is to others.

Maybe you are looking for

  • How to connect to TC, new MacBooks have no Ethernet ports

    What is recommended for large transfers to Time Capsule from new models of MacBook Pro which do not have Ethernet? (Only USB & Thunderbolt)

  • Variable lost value

    else if (invalue >= STAMP3S && invalue <= STAMP3E) NSLog(@"Greater than 250,000 and leass than 500,000 StampDuty \t\t3%%" [lblIntrest setText:[NSString stringWithFormat:@"Stamp Duty:\t\t%@" , [currencyStyle stringFromNumber:stampN3]]]; NSLog(@"Prints

  • MBP Core Duo 17" 2.16Ghz  - Why is 2GB the limit?  4GB?

    All the past and future Mac Notebooks allowed memory upgrades when the chips either became available or affordable. The Apple store advisor (when I purchased last year) said that like older Mac Notebooks they assumed that the MBP memory would be upgr

  • Client authentification

    Hello, I'm trying to use jsse whit an Apache-mod_ssl server. I want the server to authenticate the client but it doesn't work. First question : The KeyManagerFactory is the only way to authenticate a client ? Second question : my certificate are gene

  • Project file disappears after iMovie crashes. Can I recover the file?

    Working on an iMovie 9.0.9 project when the SBOD starts up and then the program crashes. I reopen iMovie but when I attempt to open the file it  no longer shows up in the Project folder window. The file still appears in the iMovie Project folder on t