O/P problem in scripts

Hi all,
           I am working on Medruck,
    I need to display delivery date in script.for this I used RM06P structure. For one P.O  it is displaing the date for some other P.Os its not displaying. I checked for those it doesn't display Del.dates in EKET but Del.dates are ther for those P.Os
can any one plz tell me why its happening like that?

Hi Ranganadh,
ur using standard RM06P for displaying values in standard script. u have to debug through to check why it is not filling in RM06P.
otherways use a subroutine to fetch delivery date from EKET against a PO if it is not coming from RM06P structure.
Regards,
Krishnendu

Similar Messages

  • Problem in script format

    hi,
    i am having problem in script , the problem is
    s.no|    descriptio                           |   UOM                      |          Qty                   |             Rate           |          AMT            |
    01     aaaaaaaaaaaaaaaaaaaaa       11.01                             17.28                     170000000               2400000
    this is fine but when the 1st column is shot other also get affected.
    s.no|    descriptio                           |   UOM                      |          Qty                   |             Rate           |          AMT            |
    01     aa       11.01                             17.28                     170000000               2400000
    and i cannot draw vertical line here .what is the solution for this.
    Edited by: jaihind on Mar 6, 2010 12:21 PM
    hi,
    problem is if the description field is long then other coloum are comming fine but if description caloumn is small then other also get affected and its comes towards left .
    Edited by: jaihind on Mar 6, 2010 12:22 PM

    Hi
    For this u can resolve by using the Formatting characters ......
    This is your layout ..
    s.no| descriptio | UOM | Qty | Rate | AMT |
    01 aaaaaaaaaaaaaaaaaaaaa 11.01 17.28 170000000 2400000
    Assume that   your field names like  
    s.no      |  description  |    UOM      |    Qty      |      Rate      |         AMT       |
    &sno&      &desc&         &UOM&       &Qty&         &rate&         &AMT&
    asseme that  length of these fields(in characters) as per your requirement will be ...
    s.no      |  description  |    UOM      |    Qty      |      Rate      |         AMT       |
    8                  15                  5                8                 10                  15
    For these use formatting characters    like   ...
                  s.no      |  description      |    UOM      |    Qty      |      Rate      |         AMT       |
    1stLine  &sno& ,,  &desc+0(15)&,,  &UOM&       &Qty&        &rate&         &AMT&
    2ndline                 &desc+15(15)&     
    &desc+0(15)&  -  it will print  first 15 characters from 0th position
    &desc+15(15)&- From 15th position it will print 15 characters ..
    Hope you resolve your issue
    Let me know if Any concerns,.......

  • Priniting problem in script

    Hi friends,
    i am facing a problem in script. i have developed the form
    and it is working fine .in print preview every thing seems to be ok.
    when we try to take a print the right side characters are cutting down by 2
    characters every time.
    i have moved the content to left but the result is the same.
    can any one tell me how to solve the issue.
    Regards,
    Srinivas

    Hi,
    Try to check the lenght of the field/var that you are printing.
    change the alignment doesnt solve the problem.
    Check in your code what is the lenght and if is the same in your form.
    Sample:
    &j_1bprnfli-cfop(4C)&
    prints only 4 digits of the variable j_1bprnfli-cfop.
    Regards.
    Rodrigo Paisante

  • Problem in script printing

    Hi Guru's
    I have a problem in script printing.
    The quantity and netprice are printing incorrectly. i.e., quantity should print as 1.000 where as it is printing as 1,000 and net price is printing as 5,30 instead of 5.30.
    I have checked in the owndata settings it is like 1,234,56.00.
    I would like to know whether any settings will be there or i need to do any modificatione
    Waiting for you reply.

    Hi!
    Here you can find the SAPScript formatting options.
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/803411454211d189710000e8322d00/content.htm
    If it is not good for you, you might code it in your printer program and put it into a character variable.
    Regards
    Tamá

  • Lately and i dont know why i see a pop up about a problem with script. can some1 help me?

    there is a pop up about a problem with script. it ask me end and contuniue the script. i didnt have that problem before. plz help me it gets really irritating. it asks a lot

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Having multiple problems with script - NTFS Permissions and AD Groups

    Hi, all!  I'm having multiple problems with my first script I've written with Powershell.  The script below does the following:
    1. Prompts the user for a corporate division under which a shared folder will be created, and adjusts variables accordingly.
    2. Prompts if the folder will be a global folder or an office/location-specific folder, and makes appropriate adjustments to variables.
    3.  If a global folder, prompts for the name.  If an office/location-specific folder, prompts for each component of the street address, city and state and an optional modifier.  I've prompted for this information in this way because the information
    is used differently later on in the script.
    4.  Verifies the entered information and requests confirmation to proceed.
    5.  Creates the folder.
    6.  Creates an AD OU and/or security group(s).
    7.  Applies appropriate security groups to the new folder and removes undesired permissions.
    Import-Module ActiveDirectory
    $Division = ""
    $DivAbbr = ""
    $OU = ""
    $OUDrive = "AD:\"
    $FolderName = ""
    $OUName = ""
    $GroupName = ""
    $OURoot = "ou=DFS Restructure Testing OU,ou=Pennsylvania Camp Hill 4410 Industrial Park Rd,ou=Locations,ou=Camp Hill,dc=jacobsonco,DC=com"
    $FSRoot = "E:\"
    $FolderPath = ""
    $DefaultFolders = "Archive","Customer Service","Equipment","Inbounds","Management","Outbounds","Processes","Projects","Quality","Reports","Returns","Safety","Schedules","Time Keeping","Training"
    [bool]$Location = 0
    do {
    $userInput = Read-Host "Enter CLS Division: (W)arehousing, (S)taffing, or (P)ackaging"
    Switch ($userInput)
    W {$Division = "Warehousing"; $DivAbbr = "WHSE"; $OU = "ou=Warehousing,"; break}
    S {"Staffing is not yet implemented."; break}
    P {"Packaging is not yet implemented."; break}
    default {"Invalid choice. Please re-enter."; break}
    while ($DivAbbr -eq "")
    write-host ""
    write-host ($Division + " was selected.")
    $FolderPath = $Division + "\"
    write-host ""
    $choice = ""
    do {
    $choice = Read-Host "Will this be a (G)lobal folder or (L)ocation folder?"
    Switch ($choice)
    G {$Location = $false; break}
    L {$Location = $true; $FolderPath = $FolderPath + "Locations\"; $OU = "ou=Locations," + $OU; break}
    default {"Invalid choice. Please re-enter."; $choice = ""; break}
    while ($choice -eq "")
    write-host ""
    write-host ("Location is set to: " + $Location)
    write-host ""
    if ($Location -eq $false) {
    $FolderName = Read-Host "Please enter folder name:"
    $GroupName = $DivAbbr + " " + $FolderName
    } else {
    $input = Read-Host "Please enter two-letter state abbreviation:"
    $FolderName = $FolderName + $input + " "
    $input = Read-Host "Please enter city:"
    $FolderName = $FolderName + $input + " "
    $input = Read-Host "Please enter street address number only:"
    $FolderName = $FolderName + $input
    $GroupName = $DivAbbr + " " + $FolderName
    $FolderName = $FolderName + " "
    $input = Read-Host "Please enter street name:"
    $FolderName = $FolderName + $input
    $input = Read-Host "Please enter any optional information to appear in folder name:"
    if ($input -ne "") {
    $FolderName = $FolderName + " " + $input
    $OUName = $FolderName
    write-host
    write-host "Path for folder: "$FSRoot$FolderPath$FolderName
    write-host "AD Path: "$OUDrive$OU$OURoot
    write-host "New OU Name: "$OUName
    write-host -NoNewLine "New Security Group names: "$GroupName
    if ($Location -eq $true) { write-host " and "$GroupName" MGMT" }
    write-host
    $input = Read-Host "Please confirm creation of new site/folder: (Y/N) "
    if ($input -ne "Y") { Exit }
    write-host
    write-host -NoNewLine "Folder exists: "; Test-Path ($FSRoot + $FolderPath + $FolderName)
    if (Test-Path ($FSRoot + $FolderPath + $FolderName)) {
    Write-Host "Folder already exists! Skipping folder creation..."
    } else {
    write-host "Folder does not exist. Creating..."
    new-item -path ($FSRoot + $FolderPath) -name $FolderName -itemtype directory
    Set-Location ($FSRoot + $FolderPath + $FolderName)
    if ($Location -eq $true) {
    $tempOUName = "ou=" + $OUName + ","
    write-host
    write-host $OUDrive$tempOUName$OU$OURoot
    write-host
    write-host -NoNewLine "OU exists: "; Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)
    if (Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)) {
    Write-Host "OU already exists! Skipping OU creation..."
    } else {
    write-host "OU does not exist. Creating..."
    New-ADOrganizationalUnit -Name $OUName -Path ($OU + $OURoot) -ProtectedFromAccidentalDeletion $false
    $GroupNameMGMT = $GroupName + " MGMT"
    if (!(Test-Path ($OUDrive + "CN=" + $GroupName + "," + $tempOUName + $OU + $OURoot))) { write-host "Normal user group does not exist. Creating..."; New-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Global -Path ("OU=" + $OUName + "," + $OU + $OURoot)}
    if (!(Test-Path ($OUDrive + "CN=" + $GroupNameMGMT + "," + $tempOUName + $OU + $OURoot))) { write-host "Management user group does not exist. Creating..."; New-ADGroup -Name $GroupNameMGMT -GroupCategory Security -GroupScope Global -Path ("OU=" + $OUName + "," + $OU + $OURoot)}
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    # $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    $BIUsers = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
    $BIUsersSID = $BIUsers.Translate([System.Security.Principal.SecurityIdentifier])
    write-host $BIUsersSID.Value
    # out-string -inputObject $BIUsers
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($BIUsersSID.Value,"ReadAndExecute,AppendData,CreateFiles,Synchronize","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.RemoveAccessRuleAll($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    get-acl ($FSRoot + $FolderPath + $FolderName) | fl
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $ADGroupName = "JACOBSON\" + $GroupName
    $objUser = New-Object System.Security.Principal.NTAccount($ADGroupName)
    $objUser.Translate([System.Security.Principal.SecurityIdentifier]).Value
    write-host $ADGroupName
    write-host $objUser.Value
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName,"ReadAndExecute","ContainerInherit, ObjectInherit", "None", "Allow")
    Out-String -InputObject $ar
    $FolderACL.AddAccessRule($Ar)
    $ADGroupName = "JACOBSON\" + $GroupNameMGMT
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName, "Modify", "ContainerInherit, ObjectInherit", "None", "Allow")
    Out-String -InputObject $ar
    $FolderACL.AddAccessRule($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    } else {
    $tempOUName = "cn=" + $GroupName + ","
    write-host
    write-host $OUDrive$tempOUName$OU$OURoot
    write-host
    write-host -NoNewLine "Group exists: "; Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)
    if (Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)) {
    Write-Host "Security group already exists! Skipping new security group creation..."
    } else {
    write-host "Security group does not exist. Creating..."
    New-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Global -Path ($OU + $OURoot)
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $ADGroupName = "JACOBSON\" + $GroupName
    $FolderACL.SetAccessRuleProtection($True,$True)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName,"Modify","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    My problems right now are in the assignment/removal of security groups on the newly-created folder, and the problems are two-fold.  Yes, I am running this script as an Administrator.
    First, I am unable to remove the BUILTIN\Users group from the folder when this is an office/location-specific folder.  I've tried to remove the group in several different ways, and none are having any effect.  Oddly, if I type in the lines directly
    into Powershell, they work as expected.  I've tried the following methods:
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    $BIUsers = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
    $BIUsersSID = $BIUsers.Translate([System.Security.Principal.SecurityIdentifier])
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($BIUsersSID.Value,"ReadAndExecute,AppendData,CreateFiles,Synchronize","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.RemoveAccessRuleAll($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    In the first case, the script goes through and has no apparent effect because afterwards, I do a get-acl and the BUILTIN\Users group is still there, although when looking through the GUI, inheritance appears to have been broken from the parent folder.
    In the second case, I get the following error message:
    Exception calling "RemoveAccessRuleAll" with "1" argument(s): "Some or all identity references could not be translated."
    At C:\Users\tesdallb\Documents\FileServerBuild.ps1:110 char:5
    +     $FolderACL.RemoveAccessRuleAll($Ar)
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : IdentityNotMappedException
    This seems strange that the local server is unable to translate the SID of a BUILTIN account.  I've also tried explicitly putting in the BUILTIN\Users SID in place of the variable in the New-Object line, but that gives me the same error.  I've
    also tried the solutions given in this thread:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/ad59dc58-1360-4652-ae09-2cd4273cbd4f/remove-acl-issue?forum=winserverpowershell and at this URL:
    http://technet.microsoft.com/en-us/library/ff730951.aspx but these solutions also failed to have any effect.
    My second problem is when I try to apply the newly-created security groups, I also will get the "Some or all identity references could not be translated."  I thought I had found a workaround to the problem by adding the -PassThru option to
    the New-ADGroup commands, because it would output the SID of the group after creation, however a few lines later, the server is unable to translate the account to apply the security groups to the folder.
    My first Powershell script has been working well up to this point and now I seem to have hit a showstopper.  Any help is appreciated.
    Thanks!

    I was hoping to stay with strictly Powershell, but unless I can find a Powershell solution, I may resort to ICACLS.
    As for the problems with my groups not being translatable right after creating them, I think I have solved this problem by using the -Server parameter on all my New-ADGroup commands and this example code seems to have gotten around the translation problem,
    again utilizing the -Server parameter on the Get-ADGroup command:
    get-acl ($FSRoot + $FolderPath + $FolderName) | fl
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    # Add the new normal users group to the folder with Read and Execute permissions
    $GroupSID = Get-ADGroup -Identity $GroupName -Server chadc01.jacobsonco.com | Select-Object -ExpandProperty SID
    $SIDIdentity = New-Object System.Security.Principal.SecurityIdentifier($GroupSID)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($SIDIdentity,"ReadAndExecute","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    # Add the management users group to the folder with Modify permissions
    $GroupMGMTSID = Get-ADGroup -Identity $GroupNameMGMT -Server chadc01.jacobsonco.com | Select-Object -ExpandProperty SID
    $SIDIdentity = New-Object System.Security.Principal.SecurityIdentifier($GroupMGMTSID)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($SIDIdentity, "Modify", "ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    Going this route seems to ensure that the Domain Controller I'm creating my groups on is the same one that I'm querying for the group's SID to use in the FileSystemAccessRule.  It's been working fairly consistently.
    Still having issues with the translation of the BUILTIN\Users group, though. 

  • Page problem in script

    Hi,
    I have one more problem. Actually my script having only one page output. But in second page also logo is printing.
    I don't want second page. In first page I have only two windows main & logo.
    Could you please suggest me how to do it.

    Hi!
    You have to set up 2 pages in SE71, FIRST, and NEXT.
    FIRST has to contain the LOGO and MAIN windows.
    NEXT has to contain only the MAIN window.
    At the FIRST page you have to set the next page as NEXT page.
    At the NEXT page you have to set the next page as NEXT page (same as FIRST).
    This makes your NEXT sides not to print the logo and handles accidentally data overflow to your second page.
    Check out if there is an explicit /: NEW-PAGE in your sapscript, this causes problems also.
    Regards
    Tamás
    Message was edited by:
            Tamás Nyisztor

  • Problem in script output sending mail

    hi ,
    I have a problem sending a mail with script output as attachment . I have searched in the forum for the answers but none is solved my question.
    I am sending the data to the otf and it is getting the otfdata. but it is not showing  the data on the script when it is sent as an attachment to the email , but it is showing only script with null values filled.( means i am getting the mail with attachment but in that attachment there is no data filled in the script send).
    the code is like this ..
    here i am filling the otfdata and i am exporting the otfdata
    CALL FUNCTION 'ZMM_ARRANG_ENTRY_ABR_NATRAB'
        EXPORTING
          i_nast       = nast
          i_fonam      = tnapr-fonam
          i_xscreen    = pi_xscreen
          i_arc_params = arc_params
          i_toa_dara   = toa_dara
        IMPORTING
          e_retcode    = px_retcode
        EXCEPTIONS
          OTHERS       = 1.
      IF ( sy-subrc <> 0 ).                "Fehler
        MOVE sy-subrc TO px_retcode.
        IF ( pi_xscreen = 'X' ).           "Ausgabe auf Bildschirm
          MESSAGE ID     sy-msgid
                  TYPE   sy-msgty
                  NUMBER sy-msgno
                  WITH   sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ELSE.
    *---Import OTFDATA from the memory
        IMPORT  it_otfdata FROM MEMORY ID 'OTF'.
      ENDIF.
      wa_maildata-obj_name = 'EMAIL'.
      wa_maildata-obj_descr = 'Settlement Details'.
    *-----mail contents
      it_mailtext-line = 'Sub-sequent settlement Details'.
      APPEND it_mailtext.
      DESCRIBE TABLE it_mailtext LINES v_lines.
      READ TABLE it_mailtext INDEX v_lines.
      wa_maildata-doc_size = ( v_lines - 1 ) * 255 + STRLEN( it_mailtext ).
    *Creation of the entry for the compressed document
      CLEAR it_mailpack-transf_bin.
      it_mailpack-head_start = 1.
      it_mailpack-head_num   = 0.
      it_mailpack-body_start = 1.
      it_mailpack-body_num   = v_lines.
      it_mailpack-doc_type   = 'RAW'.
      APPEND it_mailpack.
    *-----Get OTF data
      LOOP AT it_otfdata.
        it_mailcont-line = it_otfdata.
        APPEND it_mailcont.
      ENDLOOP.
    *---Move  OTF data into binary table
      LOOP AT it_mailcont.
        MOVE-CORRESPONDING it_mailcont TO it_mailbin.
        APPEND it_mailbin.
      ENDLOOP.
    *---Get no of lines in Binary data table
      DESCRIBE TABLE it_mailbin LINES v_lines.
    *---Fill name of the header of email
      it_mailhead = 'Subsequent Settlement Details.OTF'.
      APPEND it_mailhead.
    *---Creation of the entry for the compressed attachment
      it_mailpack-transf_bin   = 'X'.
      it_mailpack-head_start   = 1.
      it_mailpack-head_num     = 1.
      it_mailpack-body_start   = 1.
      it_mailpack-body_num     = v_lines.
      it_mailpack-doc_type     = 'OTF'.
      it_mailpack-obj_name     = 'EMAIL'.
      it_mailpack-obj_descr    = 'Settlement Details'.
      it_mailpack-doc_size     = v_lines * 255.
      APPEND it_mailpack.
    *----Get email address from the address number of vendor
      CALL FUNCTION 'ADDR_GET_REMOTE'
        EXPORTING
          addrnumber = l_adrnum
        TABLES
          adsmtp     = it_adsmtp.
    *----Get mail address
      READ TABLE it_adsmtp WITH KEY remark = 'AP_SUB_SETT'.
      IF sy-subrc = 0.
        it_mailrec-receiver   = it_adsmtp-smtp_addr.
        it_mailrec-rec_type   = 'U'.
        it_mailrec-com_type   = 'EXT'.
        APPEND it_mailrec.
    *---Send email with PDF attachment
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data = wa_maildata
            put_in_outbox = 'X'
            COMMIT_WORK   = 'X'
          TABLES
            packing_list  = it_mailpack
            object_header = it_mailhead
            contents_bin  = it_mailbin
            contents_txt  = it_mailtext
            receivers     = it_mailrec.
      ELSE.
        MESSAGE 'No email id Exist for the vendor' TYPE 'E'.
      ENDIF.
    please suggest me with your valuable answers .
    Regards,
    Venkat Appikonda.

    Hi venkat
    Just check if this helps you.
    The following part of the code does exactly that.
    Selecting details from the spool request table.
      SELECT * FROM tsp01 INTO TABLE tb_spool
               WHERE rqowner = sy-uname.
      IF sy-subrc EQ 0.
        SORT tb_spool DESCENDING BY rqcretime.
        CLEAR : tb_spool.
        READ TABLE tb_spool INDEX 1.
    convert spool into PDF format.
        CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
             EXPORTING
                  src_spoolid = tb_spool-rqident
             TABLES
                  PDF         = tb_lines.
      ENDIF.
    After this, on execution we get the below mentioned message.
    This indicates that a PDF of the SAP Script has been created which is in the format u201C132-long stringsu201D.
    In order to send the mail across, the mailing format of the PDF supports u201C255-long stringsu201D. So, the present u201C132-long stringsu201D needs to be converted into u201C255-long stringsu201D. This along with the mail code is mentioned below.
      DATA: lv_receiver(50) TYPE c.
      REFRESH: tb_obj_txt,
               tb_obj_bin,
               tb_obj_head,
               tb_paklist,
               tb_receiver.
      CLEAR: tb_obj_txt,
             tb_obj_bin,
             tb_paklist,
             tb_obj_head,
             tb_receiver.
      CLEAR: tb_adrc.
    IF NOT tb_adrc[] IS INITIAL.
    Reading the address table with the key as address number.
        READ TABLE tb_adrc WITH KEY addrnumber = tb_kna2-adrnr.
        IF sy-subrc EQ 0.
    Vendor Email ID.
          SELECT SINGLE smtp_addr
             FROM adr6
             INTO wf_mailaddr
             WHERE addrnumber = tb_adrc-addrnumber.
          IF sy-subrc EQ 0.
    Moving the mail address to the receiver itab
            MOVE wf_mailaddr TO tb_receiver-receiver.
            tb_receiver-rec_type = text-011.
            APPEND tb_receiver.
          ELSE.
            CONCATENATE text-004 tb_kna2-kunnr text-005 INTO lv_receiver
                                       SEPARATED BY space.
    If pa_call is initial, the receiver ID is printed; else an INVALID E-mail ID    message gets flashed.
            IF pa_call IS INITIAL.
              WRITE :/ lv_receiver.
            ENDIF.
            CLEAR: itab.
            itab-kunnr = tb_kna2-kunnr.
            itab-message = lv_receiver.
            APPEND itab.
            EXIT.   u201CNo mailing for invalid Email id
          ENDIF.
        ENDIF.
      ENDIF.
      wf_name = sy-uname.
      wf_year = tb_main-bldat(4).
      wf_mon = tb_main-bldat+4(2).
    *This FM gives the name of the months. 
    CALL FUNCTION 'MONTH_NAMES_GET'
           EXPORTING
                language    = sy-langu
           TABLES
                month_names = tb_months.
      IF sy-subrc EQ 0.
        READ TABLE tb_months WITH KEY mnr = wf_mon.
        IF sy-subrc EQ 0.
          wf_name = tb_months-ktx.
        ENDIF.
      ENDIF.
      CLEAR: tb_contp.
    IF NOT tb_contp[] IS INITIAL.
    *Reading the contp itab as per the customer entered on the selection screen.
        READ TABLE tb_contp WITH KEY bukrs = pa_bukrs
                                     kunnr =  tb_kna2-kunnr.
        IF sy-subrc EQ 0.
        CONCATENATE text-006 text-008 tb_contp-contp text-008 tb_kna2-kunnr
                              text-008 wf_name text-008 wf_year INTO wf_sub.
        ENDIF.
      ELSE.
        CONCATENATE text-006 text-008 tb_kna2-kunnr text-008 wf_name
                                        text-008 wf_year INTO wf_sub.
      ENDIF.
    Subject and Description
      CLEAR wa_docdata.
      wa_docdata-obj_name  = text-007.
      wa_docdata-obj_descr = wf_sub.
      wa_docdata-obj_langu = sy-langu.
    Write main body
      tb_obj_txt = text-009.
      APPEND tb_obj_txt.
      CLEAR tb_obj_txt.
      CLEAR  tb_paklist.
      tb_paklist-head_start = 1.
      tb_paklist-head_num   = 3.
      tb_paklist-body_start = 1.
      tb_paklist-body_num   = 60.
      tb_paklist-doc_type   = text-012.
      APPEND tb_paklist.
      CLEAR  tb_paklist.
    create PDF file
    Transfer the 132-long strings to 255-long strings
      LOOP AT tb_lines.
        TRANSLATE tb_lines USING ' ~'.
        CONCATENATE wf_buffer tb_lines INTO wf_buffer.
      ENDLOOP.
      TRANSLATE wf_buffer USING '~ '.
      DO.
        tb_obj_bin = wf_buffer.
        APPEND tb_obj_bin.
        SHIFT wf_buffer LEFT BY 255 PLACES.
        IF wf_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
      DESCRIBE TABLE tb_obj_bin LINES lv_lines.
      READ TABLE tb_obj_bin INDEX lv_lines.
      lv_size = ( lv_lines - 1 ) * 255 + STRLEN( tb_obj_bin ).
    Create attachment notification
      tb_paklist-transf_bin = co_x.
      tb_paklist-head_start = 1.
      tb_paklist-head_num   = 0.
      tb_paklist-body_start = 1.
      tb_paklist-body_num   = lv_lines.
      tb_paklist-doc_type   = text-013.
      tb_paklist-obj_descr  = text-010.
      tb_paklist-obj_name   = text-010.
      tb_paklist-doc_size   = lv_size.
      APPEND tb_paklist.
    *mail the PDF to the receiver.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = wa_docdata
                sender_address             = wf_name
                sender_address_type        = text-014
           TABLES
                packing_list               = tb_paklist
                object_header              = tb_obj_head
                contents_bin               = tb_obj_bin
                contents_txt               = tb_obj_txt
                receivers                  = tb_receiver
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
      IF sy-subrc <> 0.
        CONCATENATE text-003 tb_kna2-kunnr text-005 INTO lv_receiver
                                SEPARATED BY space.
        CLEAR: itab.
        itab-kunnr = tb_kna2-kunnr.
        itab-message = lv_receiver.
        APPEND itab.
        IF pa_call IS INITIAL.
          WRITE :/ lv_receiver.
        ENDIF.
      ELSE.
        CONCATENATE text-002 tb_kna2-kunnr text-005 INTO lv_receiver
                                SEPARATED BY space.
        CLEAR: itab.
        itab-kunnr = tb_kna2-kunnr.
        itab-message = lv_receiver.
        APPEND itab.
        IF pa_call IS INITIAL.
          WRITE :/ lv_receiver.
        ENDIF.
      ENDIF.
    Hope this helps.
    Harsh

  • Problem with scripts

    Certain sites, most recently The Daily Show, will not load for me. I get a box that says:
    "Warning: unresponsive script
    A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
    Script: resource://gre/modules/ConsoleAPIStorage.jsm:157
    [Continue] [Stop script]"
    Whether I click to continue or stop the script, nothing happens except that the box goes away and then comes up again. If I try to close the tab, it just hangs and then finally shows the box again.
    Finally, Firefox just gets completely hung up, and I have to close it out with the task manager.
    Meanwhile, everything runs fine in Internet Explorer.
    Can anyone please help me solve this problem?
    Thanks,
    Ellen

    Is DOM storage enabled?
    You can check the value of the dom.storage.enabled pref on the about:config page.
    *http://kb.mozillazine.org/about:config
    You can also try to delete the webappsstore.sqlite file in the Firefox Profile Folder to remove all data (cookies) stored in DOM storage.
    You can use this button to go to the Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    You can try to reset Firefox and create a new profile.
    *https://support.mozilla.org/kb/reset-firefox-easily-fix-most-problems

  • Abt clear value problem in scripts

    Hi,
    Im working on scripts.in scripts im calculating totals by using subroutine.but im facing problem.
    my problem is first time i calculated it's working fine.
    when i go back and enter other order number it's taking previous order number and present total and it displays these totals.
    i clear the it_out in se38 and the varible which holds the total.
    but it's not working.
    please help me in this.
    Thanks & Regards,
    Srinivas

    Hi this is my abap code.
    FORM get_extpr_tot TABLES it_input STRUCTURE itcsy it_output STRUCTURE itcsy.
    REFRESH : it_output.
    CLEAR v_extpr_tot.
      DATA: v_vbeln2(10) TYPE n.
      REFRESH it_input.
      Clear v_vbeln2.
    clear v_extpr_tot1.
      READ TABLE it_input INDEX 1.
      MOVE it_input-value TO v_vbeln2.
      READ TABLE it_input INDEX 2.
      MOVE it_input-value TO v_extpr_tot.
      v_extpr_tot1 = v_extpr_tot1 + v_extpr_tot.
      READ TABLE it_output INDEX 1.
      WRITE v_extpr_tot1 TO it_output-value LEFT-JUSTIFIED.
      MODIFY it_output INDEX 1.
       Clear it_output.
      clear v_extpr_tot1.
    REFRESH it_output.
    ENDFORM.                    "GET_EXTPR_TOT
    and my se71 code is
    PERFORM GET_EXTPR_TOT IN PROGRAM ZSP_SD_ORDCM.
    USING &VBDKA-VBELN&
    USING &V_PRICE&
    CHANGING &V_EXTPR_TOT1&
    ENDPERFORM
    please help me

  • Typical problem in SCRIPTS

    Hello Experts,
    I am working on SAP script where i have to display the records in a page from a internal table.
    begin of xtab occurs 0,
    vbeln like vbak-vbeln,
    matnr like mara-matnr,
    maktx like makt-maktx,
    erdat like vbak-erdat,
    date_var(1),       "indicates date change with 'x'
    status(1),         "indicates vbeln change with 'x'
    end of xtab.
    now my requirement to display to have the script is
    1) when ever the date_var is 'X' a new page should trigger.
    2) when ever status = 'X' there should be
    a line after the display of records indicating the change of vbeln saying
    "there are xxx number of materials for vbeln"
    THE PROBLEM:-
        suppose if a page can hold 20 records. and if I have 23 records.  the 3 records are dispalying in next page, with "there are xxx number of materials for vbeln"
    which is fine.
         But if when there is change of date at 24th record, where a new page should trigger- this
         is not happening and further more records from 24 index are attaching after the
         "there are 23 number of materials for vbeln are used".
        My exceptation over this display should is - it should display 20 records in frist page
        and move to next page to display 3 records along with "there are 23 number of materials for
        vbeln are used"  ( As the page could hold only 20 records). and THEN AFTER THIS AS THERE IS
        CHANGE IN DATE IT SHOULD TRIGGER A NEW PAGE to display from 24th record.
      Please Help me in giving the code for this.
    Thanks
    Mary

    Hi Mary,
    I suppose you can modify the printing program.
    Try to work with an internal table like:
    <i>erdat like vbak-erdat,
    vbeln like vbak-vbeln,
    matnr like mara-matnr,
    maktx like makt-maktx,</i>
    So the code could be something as:
    <i>SORT XTAB BY ERDAT VBELN
    LOOP AT XTAB
    AT NEW ERDAT
      if sy-tabix > 1.
        NEW-PAGE (function).
      endif.
    ENDAT
    AT END OF VBELN.
      WRITE_FORM (function)
      Element = text containing numbers of materials
    ENDAT
    ENDLOOP</i>

  • Total Problem in scripts

    Hi,
    I'm facing one big issue in scripts.ie: in printing totals.
      for totals i write a subroutine in scripts.
      it's working fine.it's displaying totals well.here my problem is first i see the print preview.at that time total is correct.but when i came back and see the print preview again it displaying wrong.ie if first time the total is 'A'.Then second time it displaying like (A+A).
      other problem is when i see the print preview and displays it and go back and took the print at that time also it displaying (A+A).
    My code is like :
    *&      Form  GET_EXTPR_TOT
        this routine will get the LINE ITEM EXTENDED PRICE TOTALS When
        there is no PROMO CODE.
    form get_extpr_tot tables it_input structure itcsy it_output structure itcsy.
      data: v_vbeln2(10) type n.
      clear it_input.
      clear v_vbeln2.
      read table it_input index 1.
      move it_input-value to v_vbeln2.
      read table it_input index 2.
      move it_input-value to v_extpr_tot.
      v_extpr_tot1 = v_extpr_tot1 + v_extpr_tot.
      read table it_output index 1.
      write v_extpr_tot1 to it_output-value left-justified.
      modify it_output index 1.
      clear it_output.
    endform.                    "GET_EXTPR_TOT
    Please Send ur valuable answers.
    Thanks,
    Srinivas.

    Hi Srinivas,
    In your script you can define the total variable in one of the header related elements that will be called. for exaple you can define it in the element
    /E HEADER_TARGET_VALUE
    /: DEFINE &V_EXTPR_TOT1& = ' '
    and change your code in ITEM_LINE_PRICE_QUANTITY element as follows
    /E ITEM_LINE_PRICE_QUANTITY
    /* Begin of modification (RICEF/Issue Number:F-SD-04) by sbhavanam
    /: PERFORM GET_EXTPR_TOT IN PROGRAM ZSP_SD_ORDCM.
    /: USING &VBDKA-VBELN&
    /: USING &V_PRICE&
    /: CHANGING &V_EXTPR_TOT1&
    /: ENDPERFORM
    your abap should look like this.
    FORM get_extpr_tot TABLES it_input STRUCTURE itcsy it_output STRUCTURE itcsy.
    DATA: v_vbeln2(10) TYPE n
    * CLEAR it_input.
    CLEAR v_vbeln2.
    CLEAR v_extpr_tot.
    READ TABLE it_input INDEX 1.
    MOVE it_input-value TO v_vbeln2.
    READ TABLE it_input INDEX 2.
    MOVE it_input-value TO v_extpr_tot.
    read table it_input index 3.
    move it_input-value to v_extpr_tot1.
    v_extpr_tot1 = v_extpr_tot1 + v_extpr_tot.
    * v_extpr_tot_tst = v_extpr_tot_
    READ TABLE it_output INDEX 1.
    WRITE v_extpr_tot1 TO it_output-value LEFT-JUSTIFIED.
    MODIFY it_output INDEX 1.
    CLEAR it_output.
    ENDFORM. "GET_EXTPR_TOT
    that should solve your issues.
    -Kalyan

  • Problem : tcl script for filter IPSec cosmetic log

    Hi all, I would like some advice from anyone who ever see this case. I applied tcl script for filter ipsec error log that log is cosmetic. But my site want to don't see this log from router log. I already create tcl script for filter it out. Ok script can work fine but it more work. It filter other message not just ipsec log out. I check cisco device that support script. How can I fix this problem.
    See my detail of script and ios version of router :
    script :
    # VPN_Error.tcl  This script deletes all log messages about VPN error messages
    # The script will filter by combination between facility-serverity and mnemonic      
    # Created on 05-Oct-2012.
    set msgs [list {CRYPTO-4-RECVD_PKT_MAC_ERR} {VPN_HW-1-PACKET_ERROR} {CRYPTO-4-RECVD_PKT_NOT_IPSEC} {CRYPTO-4-PKT_REPLAY_ERR}]
    set fac_sev_mnem "${::facility}-${::severity}-${::mnemonic}"
    foreach msg $msgs {
        if { $msg == $fac_sev_mnem } {
        return ""
    return $::orig_msg
    ios router version :
    : c2800nm-adventerprisek9-mz.124-25f.bin
    : c2800nm-adventerprisek9-mz.124-7b.bin
    log information and configuration
    When I applied command:
    logging filter flash:VPN_Filter2.tcl
    logging buffered filtered 4096 debugging
    show log file:
    router#sh logg
    Syslog logging: enabled (11 messages dropped, 1 messages rate-limited,
                    0 flushes, 0 overruns, xml disabled, filtering enabled)
        Console logging: level debugging, 18145 messages logged, xml disabled,
                         filtering disabled
        Monitor logging: level debugging, 428 messages logged, xml disabled,
                         filtering disabled
            Logging to: vty322(2)
        Buffer logging: level debugging, 0 messages logged, xml disabled,
                        filtering enabled (0 messages logged)
        Logging Exception size (4096 bytes)
        Count and timestamp logging messages: disabled
    Filter modules:
        flash:VPN_Filter2.tcl  
        Trap logging: level informational, 47011 message lines logged
            Logging to 10.145.0.25 (udp port 514, audit disabled, link up), 47011 message lines logged, xml disabled,
                   filtering disabled
            Logging to 10.247.17.41 (udp port 514, audit disabled, link up), 47011 message lines logged, xml disabled,
                   filtering disabled
            Logging to 10.247.17.45 (udp port 514, audit disabled, link up), 47011 message lines logged, xml disabled,
                   filtering disabled
    --More--                          
    Log Buffer (4096 bytes):
    router#
    If you have some more information. Please tell me.
    Thank you for your advice

    It looks like your script has an error.  You have an extra '}'.  It should be:
    # VPN_Error.tcl  This script deletes all log messages about VPN error messages# The script will filter by combination between facility-serverity and mnemonic       # Created on 05-Oct-2012.#set msgs [list {CRYPTO-4-RECVD_PKT_MAC_ERR} {VPN_HW-1-PACKET_ERROR} {CRYPTO-4-RECVD_PKT_NOT_IPSEC} {CRYPTO-4-PKT_REPLAY_ERR}]set fac_sev_mnem "${::facility}-${::severity}-${::mnemonic}"foreach msg $msgs {    if { $msg == $fac_sev_mnem } {        return ""    } } return $::orig_msg

  • InDesign Fonts problem Bookmark Script

    Dear All,
    We developed one script for creation of Bookmark in InDesign CS2. When we are runnign this script content formatting is getting anmoly changed, I analyzed InDesign file and came to know that due to a font called "Trade Gothic Bold No. 2" due to this font all formatting of the content is getting change.
    But in script I am not doing anything with fonts, only we are untagging the content to take the reference for creation of bookmark. The script is working very fine for other files from last 6-7 months but only this file is having this kind of problem.
    If any one know the reason please let me know, I know this might be not related to scripting forum but if we recieved any issue related to it. Please let me know the solutions also how to aviod these kind of problem.
    Regards,
    Rajeev

    In all likelihood, you have based one or more of your paragraph styles on "[Basic Paragraph]". If the Basic Paragraph style differs from document to document, then when you paste text in it will change to match Basic Paragraph in this doc instead.
    Edit the styles in both documents to be based on "No Style" instead.

  • Having problems compiling script

    I am rather new to java an started a couple of days ago and I ran into a problem compiling this script in the command line
    class VariableDemo {
    public static void main (String args[]) {
    int num = 1000;
    System.out.println (num + " is the value of num") ;
    At first I forgot to capitolize the 'S' in System (which is why I was getting errors) but after I had corrected it , I still could not get it to compile in a command prompt
    even after I corrected my mistakes, I still get this error:
    error: cannot read: VariableDemo.java
    1 error
    When I ran it through JCreator it compiled it just fine and found no errors. SO I just want to know if it is some thing that has to do with the command line or is there an error I am not seeing?
    I am running Windows XP Pro with service pack 2 and using JCreator 3.50.010

    Sorry, I am new to this I just called it script out of ignorance, but, yes it is in the same directory. I even Pathed it out again to be sure.

  • SCSM 2012 - Problems running script in custom workflow

    Hi all,
    I'm trying to create a custom workflow in the Authoring Tool that will send an email when a ticket in certain queues is unassigned, but I only want this to run during business hours. I've created the PowerShell script, and it runs great on its own.
    However, whenever I try to add any kind of scripting event to a custom workflow, the workflow fails:
    Microsoft.EnterpriseManagement.Common.InconsistentDataException: The requested objects had an unknown management pack. ---> Microsoft.EnterpriseManagement.Common.InconsistentDataException: The call produced inconsistent results. The data on the client
    does not match the data returned from the server. The most likely cause is that client-side cache is out of sync with server data. ---> Microsoft.EnterpriseManagement.Common.ObjectNotFoundException: An object of class ManagementPack with ID %GUID% was not
    found...
    If I create and import a management pack with an empty workflow, the workflow succeeds. If I use the "Add AD DS User to Group", the workflow succeeds. But as soon as I add a scripting event, the workflow fails.
    For testing, I added a PowerShell event with this code: 
    $a=1
    I also added a Command Script event with this code and got the same error as above: ping SomeServer
    I even tried a VBScript, but that caused the workflow to not run at all:
    dim someVariable
    someVariable = "some value"
    I then disabled the VBScript activity and the workflow runs successfully.
    I'm running SCSM 2012 SP1 with UR4. I am copying the .dll file into the SCSM installation directory (which is not in the default location). The GUID referenced in the error code is the GUID for my custom MP.
    This is my first time creating a custom workflow in the Authoring Tool. Can you tell me what I'm missing? Please let me know if you need any more information
    Thanks!
    Marnie

    Thanks, Anders. I had seen that issue in my searches on this problem. I had tried both the manual fix suggested in that post as well as upgrading to UR4 (so I'm on on SP1 UR4). Neither approach made any difference.
    Am I supposed to do anything with the .cs, .xoml, and .xomlx files that also get generated? I noticed that if I move ALL the associated files into the install directory (not just the .dll file), then import the MP, I get a different error. Instead of the
    MP being missing, the error is now:
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.ServiceManager.WorkflowAuthoring.ActivityLibrary.WindowsPowerShellScript.Activity_Closed(Object sender, ActivityExecutionStatusChangedEventArgs e)
       at System.Workflow.ComponentModel.ActivityExecutorDelegateInfo`1.ActivityExecutorDelegateOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
       at System.Workflow.Runtime.Scheduler.Run()
    This makes it seem like I do need to move ALL the files to the install directory, but maybe now the workflow just doesn't like my code?
    Thanks!
    Marnie

Maybe you are looking for

  • I used to champion these forums. Now I don't give a gnat's...

    I was a contributor, a corrector, a clarifier. I'd write 1,500 words explaining every possible angle on the simplest of topics, sometimes revealing tricks to people who have far more experience with Photoshop than I do. I exercised painstaking detail

  • Connecting HP LaserJet P3015 printer (via Cat5e) to Extreme base

    I've configured my network (thanks to the help of this forum): Airport Extreme Base station (extended by Airport Express). My laptops (connected wirelessly) run OS10.7.5.  I am using Airport Utility 6.3.1 I am attempting to configure an HP LaserJet P

  • Groups in Contacts on iPad now does nothing

    it lists my groups but won't list the contacts in them. Can't use them in phone on iphone. Clicking on group name just toggles in list. i'm running ios6.1 but not sure when it got like this.

  • MAP KEYFIGURES

    Hi, Do we map key figures in account based profitability analysis. If we do which ones? What are 0ACCOUNT, 0AMOUNT and 0BALANCE for? Does 0ACCOUNT bring in all the elements from the char of accounts into BI? Thanks TJ

  • Find out missing dates in table

    Hi, I've a table that sould have a record for day with sales info, but for some reason there are missing dates, is there any way i could find out witch dates are missing. Table Example: sales_date | value 2010-01-01 | 20 2010-01-02 | 30 2010-01-04 |