Sapscript in_tab-value to lf_vbeln in Perform

Hello guys,
I'm trying to pass value of sales order number from in_tab-value Sapscript form into a variable of type vbeln. How do I get the leading zero's in the order number?
e.g if order is 127, i would like to have the value 000000127 in a variable.
Regards,
Ahmad

Assign like this &itab-vbeln(K)& it will be with leading zeroes.

Similar Messages

  • Spool read data (sapscript output value)

    Hi Gurus,
    I need to read spool data. I tried following program ;
    DATA : mem_tab LIKE abaplist OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF itab OCCURS 0,
      data(2000),
    END OF itab.
    SUBMIT rspolst2 EXPORTING LIST TO MEMORY AND RETURN
      WITH rqident = '158593'
      WITH first = '1'.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = mem_tab."( TABLE LIKE TABLE OF abaplist ).
    break xkbahar.
    IF NOT mem_tab[] IS INITIAL.
      CALL FUNCTION 'LIST_TO_ASCI'
        EXPORTING
          list_index = -1
        TABLES
          listasci   = itab
          listobject = mem_tab." (LIKE TABLE OF abaplist)
    ENDIF.
    and   [converting spool contents into internal table;
    but doesn't help me. Because i want to read sapscript output value in spool. 
    anybody have idea ? how do i read my sapscript output data in spool?  Any function any program?
    Please help me with the solution.
    Regards
    Emre.

    Hi,
    By selecting print icon of your form output ur able to generate spool of the document.
    Ex: va03->provide orden no ->frm menu -> Sales Document -> issue output to-> select output type-> click on print icon(ctrl+p).
    Spool of the form will be creatted for u, Check the same in SPO1 transaction.
    For further details you can debug the same after selecting print icon.
    If you need further details, Provide me the exact business requirement.
    Regards,
    Bysani.

  • Set new value as a default value while creating PD(Performance Dailog) Form

    Hi,
    In Performance management,
    While clicking on the Create new PD Form Button, We are getting one Pop up window with the deafult selection screen.
    In that,
    We are getting Valid From: and Valid To value bydefault as a '01.01.2011' and '31.12.2011' .
    We need to change that value. How can we set our new value as a default value.
    We checked in debugging, this values are hardcoded in the SAP standard dyanpro component.
    how can we set our new default value?
    Please suggest.
    Thanks in advance.
    Monika

    You create it through PHAP_ADMIN_PA?
    The validity period is being defined by the BAdI HRHAP00_DOC_DEF_DV
    Implementation HRHAP00_DOC_DEF_DV02,
    can you chekc this/
    If you want to create appraisal documents for multiple participants, a
    more convenient way would be to use 'PHAP_PREPARE'. This also sets the
    validity period.
    If you still want to create the appraisal documents using 'PHAP_CREATE'
    and you want to use the BAdI for defaulting the validity period, you can
    adapt the BAdI implementation to your needs yourself. In that case,
    please make a copy of the BAdI implementation 'HRHAP00_DOC_DEF_DV02'.
    When creating a new appraisal, the system suggests the period January 1
    to December 31 of the current year as the default appraisal period. You
    can change this default by changing the Business Add-In (BAdI)
    HRPDV00APPRAISAL0001 in the ERP system."

  • Displlay value in script using perform-form .

    hi
    experts
    i am new in script.
    i am using function module read_text.
    in my script there is 3 window and using this fm i want to put text in that script.
    so i use form in se38 . my main problem is name1 = invoice no.
    if invoice no change text is change .
    how i use the variables in se38 and use in script?(main problem)
    (V55ENAFT-vbeln = invoice no in script.)
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
       CLIENT                        = SY-MANDT
        ID                            =   'NBOX'
        LANGUAGE                      = 'E'
        NAME                          = 'NAME1'
        OBJECT                        = 'VBBK'
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
      TABLES
        LINES                         = tline2(vales of text)
    EXCEPTIONS
      OTHERS                        = 8
    so i need to call 3 subroutines in 3 differnt window
    thanks
    ajay

    Hi ,
      You can call subroutines created in programs in scripts as below:
    in scripts you need to call subroutine as below:
    perform get_text in program zprogram
    using &V55ENAFT-vbeln&
    changing &w_text&
    in program:
    form get_text tables i_tab structure itcsy o_tab strucutre itcsy.
    read table i_tab with key name = 'V55ENAFT-vbeln'.
    here you will have the value of the invoice in i_tab -value.
    so get the text for the invoice and assign to o-tab
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    CLIENT = SY-MANDT
    ID = 'NBOX'
    LANGUAGE = 'E'
    NAME = V55ENAFT-vbeln
    OBJECT = 'VBBK'
    * ARCHIVE_HANDLE = 0
    * LOCAL_CAT = ' '
    * IMPORTING
    * HEADER =
    TABLES
    LINES = w_text
    * EXCEPTIONS
    * OTHERS = 8
    o_tab-name = 'w_text'.
    value = w_text.
    Regards,
    Himanshu

  • Succession Planning 3.0: Assigning values to potential, risk, performance

    Hi,
    In the employee details panel of Succession planning, there is a tab called Talent Assessment. In this tab, there are potential, risk and performance. However, I can't assign a value to it. Where am I supposed to assign these values for the employee?
    Thanks.

    Hi All,
    Yes this is correct - In using the documents available for talent and performance assessments, as well as risk of loss, the values will become populated in SAP's associated infotypes and therefore visible in Nakisa. Risk of Loss is another infotype, not 7408 or 7409, but has the same concept as both performance and potential.
    The Nakisa application connects directly to these infotypes to read the stored data. There are a few additional configurations here that also need to be done to display these values in the grid specifically:
    In the ABAB Add-on keywords section (Nakisa administrator console, Data center), you will need to define the scales used for performance, potential, and risk of loss values. You will also need to define the criteria ID to use for risk of loss as only one criterion can be displayed in the grid.
    Hope this helps!
    Agatha

  • How to record value of field to perform action when saving with new value

    Hi,
    I have a multi-tabbed form (Forms 6i). I need to include code so that when a field is changed on one tab and is saved, then I need to update some fields on the other tabs.
    My first question is: How can I record a copy of the field whenever data is brought into the form (ie: through a query), and then what is the best way to update the other data:
    1) Update the database and then requery somehow
    2) Update the fields on the other tabs and then commit to the database?
    And roughly I how I do it?
    Any help appreciated
    Adam

    > if the user is inserting a new record and I try and use the DATABASE_VALUE property on that field.... what is going to happen?
    Read the on-line help for Database_value. Use :System.record_status to determine if the record is being inserted, then don't get database_value. It is not clear, but I believe on such records, it returns the current value of the item, not a null value. Regardless, it is useless.
    If you want to update fields in other blocks in your form automatically based on changes in a different block, you can start a non-repeating timer in a when-validate-item trigger on the field. When the timer expires, you can navigate to the other blocks and to various records, and update the fields in the other blocks. Then when the user commits, all changes will be applied together. The only trick to using a timer like that is that in the commit process, you also need to check to see if the timer exists, and if it does, delete the timer and do the updates to the other tables.

  • How to display 2 values in a Key Performance Indicator display screen.

    Given the following sql code, how do I display the results for both: “closed_count/all_count” (which is already after the Select satement) and “closed_count-all_count” (not yet in the sql code)?
    SELECT closed_count/all_count
    FROM
    (select count(evt_code) all_count from rfevents WHERE <condn. for open events>) a,
    (SELECT
    count(evt_code) closed_count
    FROM
    r5events
    WHERE
    evt_jobtype in ('BRKD') and
    evt_org = '5221' and
    evt_mrc ='7100-5221' and
    EVT_REPORTED between trunc(next_day(sysdate, 'SUNDAY')-6) AND trunc(next_day(sysdate, 'SUNDAY'))
    ) b

    Read the Oracle documentation on SELECT, specifically the "select_list" diagram. Look at the SELECT examples on that page or many of the ones in this forum.

  • Sapscript Passing parameter value not shown.

    Hi all,
    I am writing a sapscript form to call a subrountine by passing the hardcode parameter 'ZXX_TSI_SHIPMENTS_FROM' shown as below: -
    PERFORM GET_STANDARD_TEXT IN PROGRAM ZPXX_SHIP_INST
    USING 'ZXX_TSI_SHIPMENTS_FROM'
    CHANGING &ZXX_TSI_SHIPMENTS_FROM&
    ENDPERFORM
    My problem now is when I debugged in program ZPXX_SHIP_INST, the passing parameter is empty.
    Could someone help me?
    Thanks in advance.

    Hi.
    In program  ZPXX_SHIP_INST write like this.
    FORM GET_STANDARD_TEXT TABLES in_tab STRUCTURE itcsy
                                                              out_tab STRUCTURE itcsy.
    READ TABLE in_tab WITH KEY name = 'INVAR_1'
      IF sy-subrc = c_zero.          "check for subrc
        lv_ebeln = in_tab-value.
      ENDIF.
    CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                  = sy-mandt
          id                      = p_lc_f01
          language                = sy-langu
          name                    = p_lv_ebeln
          object                  = text-t28        "EKKO
        TABLES
          lines                   = it_tline
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.
      IF sy-subrc <> c_zero.        "checking for subrc
        "to avoid epc error
      ENDIF.                        "IF sy-subrc <> c_zero
    in it_tline[] u can get the text.
    cocatenate this text into one variable and pass this to script.

  • Sapscript printing only the last value

    Hello,
    Im currently coding subroutine for medruck.. My problem is sapscript is only printing the last value of the item for all items.. For example:
    Item # 1    10 pcs  10,000.00
    Item # 2     5 pcs   10,000.00
    Item # 3     5 Pad  10,000.00
    where actually the value of item 1 and item 2 is not 10,000.. sapscript prints only the price of item # 3 for the  first two items.. here is my code..
      TABLES: konv, ekko, ekpo.
      DATA: BEGIN OF tab OCCURS 0,
          brtwr LIKE ekpo-brtwr,
          ebelp LIKE konv-kposn,
          ebeln LIKE ekko-ebeln,
          knumv LIKE ekko-knumv,
          kbetr LIKE konv-kwert,
    END OF tab.
      DATA: sum TYPE p DECIMALS 2, gross TYPE p DECIMALS 2, val(16) TYPE c, d_knumv LIKE ekko-knumv, tab1 LIKE tab, val1(20) TYPE c,
            ext TYPE p DECIMALS 2, val2(20) TYPE c, extend TYPE p DECIMALS 2.
      REFRESH: tab.
      READ TABLE in_tab INDEX 1.
      CHECK sy-subrc = 0.
      SELECT brtwr ebelp ebeln FROM ekpo INTO TABLE tab WHERE ebeln = in_tab-value.
      LOOP AT tab.
        AT NEW ebelp.
          tab-kbetr = 0.
          ext = 0.
        ENDAT.
        SELECT SINGLE knumv FROM ekko INTO tab-knumv WHERE ebeln = tab-ebeln.
        SELECT SINGLE kbetr FROM konv INTO tab-kbetr WHERE knumv = tab-knumv AND kposn = tab-ebelp                                AND kschl = 'ZDEL'.
        ext = tab-brtwr + tab-kbetr.
        AT END OF ebelp.
          READ TABLE out_tab INDEX 1.
          WRITE ext TO val.
          out_tab-value = val.
          MODIFY out_tab INDEX 1.
        ENDAT.
        CLEAR: tab.
      ENDLOOP.
    i used this code using abap only and it work. there seems to be a problem in sapscript.. Thank u for the help guys..
    Thanks,
    JP

    put ur write_form with in loop...
    loop at itab.
      write_form..
          element = 'ddd'
    endloop.
    in script check ...
    check wheather element is specified there r not
    /e  ddd.
         &itab-   &  &itab-  &

  • Standard value for performance monitoring

    Guys,
    I am looking into performance monitoring in the RWB bacause I think our production server is too slow. I get an average processing time per message around 60 sec, +/- 30 sec depending on the volume going through. This is obviously an unexceptable value...
    But I was wondering, are there standards set for these values to indicate when performance is too (s)low? Any reference docs available from SAP?
    Thanks

    There are various factors need to be considered. 60 seconds happening for almost all interfaces or only some specific. If only for some interfaces, then check the message volume size. SAP recommends message size up to 5 mb for optimum performance. Also security layers such as https/ssl and message level security such as encryption or digital signing/verify could cause some additional delay in processing too.
    Fixing Hardware is easy... You go for the SAP recommended spec.
    If you are using PI 7.1 or above use Message Packaging configuration. This will help considerable boost in performance.
    Please check this link
    http://help.sap.com/saphelp_nwpi71/helpdata/en/46/7a6e3469454b2be10000000a155369/content.htm

  • Query regerding Sapscript : Calling abap subroutines

    Hello everybody
    Hope everyone is doing fine.
    I've a small query. Whenever we require to call an abap subroutine from an abap sapscript we do the same using PERFORM statement. The syntax for the same is as below:
    PERFORM SUBROUTINE_NAME IN PROGRAM PROGRAM_NAME
    USING &VARAIABLE&
    CHANGING &VARAIABLE&
    ENDPERFORM
    Here we are passing the varaiables to the subroutine and getting back values in varaibles. In the actual program we then read values from in_tab and out_tab having structures similar to itcsy.
    The above mentioned is as per my understanding. My query is as follows:
    If in the above statement instead of passing varaibles abnd getting back variables can be pass/get back an internal table?
    I had read somewhere that it is possible using structures. If anyone is aware of how to do the same can you please give me the syntax. Actually how to get value from subroutine into an internal table. What will be the structure? Will it be same as itcsy?
    Thanks a lot to everybody in advance.
    Thanks & Regards
    Kabir Radhakrishnani

    hi check this program!!!
    REPORT Z_TEST_VBBE .
    types : begin of t_vbap ,
             VBELN like vbap-VBELN,
             posnr like vbap-posnr,
             concat(18),
            end of t_vbap.
    tables : vbap .
    select-options : s_vbeln for vbap-vbeln .
    data : it_vbap type table of t_vbap ,
           wa_vbap type t_vbap.
    select vbeln posnr from vbap into table it_vbap
    where vbeln in s_vbeln .
    " group by vbeln.
    loop at it_vbap into wa_vbap .
      perform select_data using wa_vbap-vbeln
                                wa_vbap-posnr
                       changing wa_vbap-concat      .
      modify it_vbap from wa_vbap .
    endloop .
    *&      Form  select_data
    *form select_data using vbeln type vbap-vbeln
                          posnr type vbap-posnr
                          concat.
    *endform.                    " select_data
    *&      Form  select_data
    form select_data using    p_wa_vbap_vbeln
                              p_wa_vbap_posnr
                     changing p_wa_vbap_concat.
             concatenate p_wa_vbap_vbeln
                         p_wa_vbap_posnr
                    into p_wa_vbap_concat
                    separated by '|' .
    endform.                    " select_data

  • Perform in script

    Dear All,
             I am using perform statement in script.
    the code for subroutine in separate program type (e).
    But unable to get the output.
    Following is my code of subroutine & form.
    Regards,
    Dilip
    Script code
    /:PERFORM GET_VAL IN PROGRAM ZGET_VAL
    /:USING &IT_MARA-MATNR&
    /:CHANGING &DESCR&
    /:ENDPERFORM
    Subroutine code
    Form get_val tables in_tab structure itcsy
                       out_tab structure itcsy.
    select * from makt into table it_makt
            where matnr = in_tab-value.
    data temp(40).
    loop at it_makt.
    temp = it_makt-maktx.
       out_tab-name =  'maktx'.
       out_tab-value = temp.
       append out_tab.
    endloop.
    endform.

    Hi Diliip,
    The program I was referring to was the program that was calling the SAPSCRIPT.
    The structure is like:
      MAIN PROGRAM calls SAPSCRIPT
        SAPSCRIPT calls ZGET_VAL.
    When the MAIN PROGRAM calls the SAPSCRIPT it issues a WRITE_FORM function module call specifing the name of the paragraph to be printed.  The data in IT_MARA must be populated from the MAIN PROGRAM (by use of LOOP AT, or READ TABLE) so that first it is available in the SAPSCRIPT, and thus available to ZGET_VAL when it is called from the SAPScript.
    You can test whether the IT_MARA-MATNR has a value in the SAPScript by simply putting:
    &'Material number is: 'IT_MARA-MATNR&
    as a line in your SAPScript.  If it comes out blank then you need to change the MAIN PROGRAM as I described in the last post.
    If it has a value then we need to change the SAPScript.
    Let me know how it goes.
    Brad

  • Adding in Select statement for SAPscript printout

    Hi everyone,
    I have a new requirement where i would need to output a new field in a sapscript printout.
    A summary of the requirements is as follows:
    -> If EKPO-PSTYP = '3'
       -> select RSNUM
          from EKET
          where EKET-EBELN = EKPO-EBELN and
                EKET-EBELP = EKPO-EBELP
       -> select MATNR
          from RESB
          where RESB-RSNUM = EKET-RSNUM
       -> display RESB-MATNR in printout
    At the moment, the sapscript is only reading from table EKPO, whereas for the new requirement to work, i'll also need to read from table EKET and RESB. Am i right to understand that sapscript cannot read SELECT statements directly from the Change Editor and i would need to do a PERFORM statement?
    The question now is, where do i put this part of the logic? Any ideas?
    Message was edited by: Bernard Loh

    Hi,
    Write a PERFORM in your script.
      PERFORM GET_MATNR IN PROGRAM Z_SUBROTINEPOOL
                        USING W_EBELN W_EBELP
                        CHANGING W_MATNR
      ENDPERFORM.
      And check the following to write the FORM in the Z program.
    The structure ITCSY is used in relation with SAPScripts. You can call a Routine in any program in SAPScript.
    For eg: if you have a subroutine named ADD_INCOME in a program ZSHAIL_BASIC, you can call the subroutine in SAPScript as follows:
    /: PERFORM ADD_INCOME IN PROGRAM ZSHAIL_BASIC
    /: USING &var1&
    /: CHANGING &var2&
    /: ENDPERFORM.
    Here the input parameter to the subroutine is var1 and the value returned by the subroutine is var2.
    In the program ZSHAIL_BASIC, you have to call the subroutine as
    FORM ADD_INCOME TABLES IN_TAB STRUCTURE ITCSY OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    IN_TAB is a structure of type ITCSY,which has 2 components, NAME and value.
    So in the program, var1(which is sent from SAPScript) , will be stored as IN_TAB-NAME and its value will be in IN_TAB-VALUE. You can utilise the IN_TAB-VALUE and after performing the required operations, the return value should be assigned to table OUT_TAB.
    This value can thus be obtained in var2 specified in SAPScript.
      Also you can search for "SUBROUTINE IN SCRIPT"... "PERFORM IN SCRIPT", "ITCSY"....
    Thanks and Regards,
    Bharat Kumar Reddy.V

  • How to psss a table from sapscript to routine program

    HI,
    i want to pass a table from sapscript to routine program.
    the requirment is to sor the table by material number wise.
    how do we pass throug itcsy structure.
    Regards,
    Balachandran

    REPORT YMMR_TDS_LPRG .
    TABLES: ADRC."Central address administration
          FORM FETCH_VEN_ADD                                            *
    -->  IN_TAB                                                        *
    -->  OUT_TAB                                                       *
    FORM FETCH_VEN_ADD TABLES IN_TAB STRUCTURE ITCSY
                              OUT_TAB STRUCTURE ITCSY.
      DATA: L_STREET4 LIKE ADRC-CITY2,
            L_STREET5 LIKE ADRC-LOCATION,
            L_INDEX1 LIKE SY-TABIX.
      DATA: LEN TYPE I.
      DATA: Z1(5) VALUE '00000'.
      LEN = STRLEN( IN_TAB-VALUE ).
      IF LEN = 5.
        CONCATENATE '00000' IN_TAB-VALUE INTO IN_TAB-VALUE.
      ELSEIF LEN = 6.
        CONCATENATE '0000' IN_TAB-VALUE INTO IN_TAB-VALUE.
      ENDIF.
      SELECT CITY2 LOCATION FROM ADRC
      INTO (L_STREET4,L_STREET5)
      WHERE ADDRNUMBER = IN_TAB-VALUE.
        IF SY-SUBRC = 0.
          LOOP AT OUT_TAB.
            CLEAR L_INDEX1.
            IF OUT_TAB-NAME = 'ADRC-CITY2'.
              L_INDEX1 = SY-TABIX.
              OUT_TAB-VALUE = L_STREET4.
              MODIFY OUT_TAB INDEX L_INDEX1 TRANSPORTING VALUE.
            ELSE.
              L_INDEX1 = SY-TABIX.
              OUT_TAB-VALUE = L_STREET5.
              MODIFY OUT_TAB INDEX L_INDEX1 TRANSPORTING VALUE.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDSELECT.
    ENDFORM.
    Se71
    /:PERFORM FETCH_VEN_ADD IN PROGRAM YMMR_TDS_LPRG
    /:USING &T001-ADRNR&
    /:CHANGING &ADRC-CITY2&
    /:CHANGING &ADRC-LOCATION&
    /:ENDPERFORM

  • How to do calculation to a variable in Sapscript form

    Hi experts,
    My question looks simple but I failed to solve it. Supposed in the Sapscript form there are two variables: &it_tab-qty1&, &it_tab-qty2&. I need to add the first variable's value to the second one, I tried as below in Sapscript form editor:
    /: &it_tab-qty2& = &it_tab-qty2& + &it_tab-qty1&
    But it doesn't work. Could you please tell me the syntax to do such calculation in Sapscript? I cannot modify the print program so I have to modify the Sapscript form instead.
    Thanks a lot.
    Yu

    Yes, you need to write an external program using SE38 to perform the calculation.
    The syntax in SAPscript:
    /* all the var define in the SAPscript is char string type
    /: define &v1& = &it_tab-qty1&
    /: define &v2& = &it_tab-qty2&
    /: define &v3& = ''
    /* GET_COMPNAME is the form name & Z001 is the program name
    /: PERFORM GET_COMPNAME IN PROGRAM Z001
    /: USING &v1&
    /: USING &v2&
    /: CHANGING &v3&
    /: ENDPERFORM.
    The syntax in program Z001 (Created by SE38):
    REPORT ZFIR001.
    FORM GET_COMPNAME tables in_tab structure itcsy
                                                     out_tab structure itcsy.
      data : p_1 TYPE CHAR80,
               p_1 TYPE CHAR80,
               p_3 TYPE CHAR80.
      retrieve data from the SAPscript
        READ table in_tab index 1.
        MOVE in_tab-value to p_1.
        READ table in_tab index 2.
        MOVE in_tab-value to p_1.
      Write the code to convert p_1 & p_2 to numeric and perform the addition to p_3
      After that convert the p_3 to char.
      send data back to the SAPscript
        read table out_tab index 1.
        move p_3 to out_tab-value.
        modify out_tab index sy-tabix.
    ENDFORM.

Maybe you are looking for