Managing Program Variants through program

Hi,
I used the function modules RS_VARIANT_CONTENTS to load the program variants and RS_CHANGE_CREATED_VARIANT to change the variants. The program is working fine but I have a problem with the length of the field. The VARI_CONTENTS table for the function modules has the fields LOW (CHAR 45) and HIGH(CHAR 45) which hold the values for the fields(parameter or select-options). But the value of the field being more than 45 chars is being truncated while saving the variants through these function modules.
But when I change directly through GOTO->VARIANTS and then save the value, Its accepting the field value with more than 45 chars. Please do the needful at the earliest possible.
Thanks in Advance.
Regards,
Raj.

Hi,
I used the function modules RS_VARIANT_CONTENTS to load the program variants and RS_CHANGE_CREATED_VARIANT to change the variants. The program is working fine but I have a problem with the length of the field. The VARI_CONTENTS table for the function modules has the fields LOW (CHAR 45) and HIGH(CHAR 45) which hold the values for the fields(parameter or select-options). But the value of the field being more than 45 chars is being truncated while saving the variants through these function modules.
But when I change directly through GOTO->VARIANTS and then save the value, Its accepting the field value with more than 45 chars. Please do the needful at the earliest possible.
Thanks in Advance.
Regards,
Raj.

Similar Messages

  • Modification of values of variant through program for tcode CJB1

    hi,
    How can we modify variant values for the variant created in TCODE CJB1 and also how to get the variant name saved for tcode CJB1 ? is there any FM available or any sample code for getting/changing the above senario.
    many thanks in advance
    bobby

    check these fm's
    RS_ALL_VARIANTS_4_1_REPORT     All Variants for a Report
    RS_CHANGE_CREATED_VARIANT
    RS_CREATE_VARIANT              Creating a variant (not using a selection screen)
    RS_GET_SCREENS_4_1_VARIANT     All screens assigned to a variant
    RS_RWSET_CREATE_VARIANT
    RS_RWSET_SAVE_VARIANT
    RS_VARIANT_ADD
    RS_VARIANT_ADMIN_DATA
    RS_VARIANT_ATTR_SAVE
    RS_VARIANT_CATALOG             Returns variant directory for a report in an internal table
    RS_VARIANT_CAT_PRINT
    RS_VARIANT_CHANGE              Change Variant
    RS_VARIANT_CHECK_TSTC          Checks entries in report transaction maintenance
    RS_VARIANT_CLIENTCOPY          Function Module for Client Copy
    RS_VARIANT_CONTENTS
    RS_VARIANT_CONVERT_TO_DYNAMIC
    RS_VARIANT_COPY                Copy variant
    RS_VARIANT_DELETE              Delete Variant (In Current Client or All Clients)
    RS_VARIANT_DEL_ALL_CLIENTS
    RS_VARIANT_DISPLAY
    RS_VARIANT_DISPLAY_FROM_SELSCR
    RS_VARIANT_DISPLAY_SUBSCREENS
    RS_VARIANT_EXISTS              Checks whether variant exists
    RS_VARIANT_FETCH

  • Process chain program variant will not change from yellow...

    Hello,
    <b>Problem:</b>
    I have a process chain that has two branches with 3 process chain variants on each leg in a parallel configuration.  The process chain variants run different program variants.  I am using variant object called "ABAP Program with Success/Failure " which can have a yellow, green, or red status and has status arrows that can be either red or green that connect to other process chain variants.  The program executed with these variants is a customized BPS UPC_BUNDLE_EXECUTE program.  When I run this PC the first variant on each leg usually hangs indefinitley on the yellow status.  In the Backg tab log (double click PC variant in Log View) I can see the various SQL code that was ran.  The last line of the log is an SQL-END:...  Sometimes it will get past the first 2 varaints and hang on the next set of 2.  Other times it will just hang on the last variant of one leg.  It is very sporadic.
    <b>What I have observed and tried:</b>
    If I check my SM51 for the server the chain is running on I can see that the program in question is not running.  If I run the same program through SE38 that runs via a PC variant it runs sucessfully in an appropriate amount of time.  If I kill the process that has been running indefinitley through SM51 the process chain variant will go from a yellow status to a red as expected.
    I changed they way I ran the programs from running in parallel in 2 legs to running all of them in one leg serially.  That did not work.  At least one program variant will hang on the yellow status.
    I replaced all the variants using "ABAP Program with Success/Failure" to "ABAP Program" which has a red/green status but no red or green arrows, but black coming out of the variant forcing it to move down the chain on a sucess or failure.  The process chain variants also hung in the yellow status using the "ABAP Program" variant. 
    I have tried starting the process chain using both "Direct Scheduling" with "Immediate" and "After Event."  I have also kicked it off using "Start Using Meta Chain or API" so it was functioning as a sub process chain. Programs were still yellow in every case without changing to red or green. 
    I created new process chain variants for every single program/variant that I am using.  Still no luck.
    I have tried removing the chain from the schedule and re-activating and re-running and still no luck. 
    Thanks in advance,
    Gary Martins

    bump

  • Assigning iViews to the Page through Program

    Hi,
    I have a page, which is already contains few iViews and set the layout. These all iViews are visible.
    Now I have assigned one more iView and aligned but it is invisible.
    Now I would like to change the property of this iView to make it visible and at the same time i have to make invisible for another iView.
    This I need to implement through program. Please let me know how to achive this .
    Thanks

    Thanks for your reply.
    This page will be visible for all users and all users having this role.
    The present requirement is that the content manager should able to decide which iView has to be displayed for the user.
    I hope it is clear
    Thanks

  • Creation of new Print Program & Variant for new Correspondence Type created

    Dear Friends,
    I have created 2 new Correspondence Types in SAP as SAP61 (Vendor Debit Note) & SAP62 (Vendor Credit Note) by copying SAP09 (Internal Document) properties like itu2019s Name of the print program - RFKORD30 & Name of variant - SAP09.
    We are facing problem when we execute print program in F.64 for SAP09 it is coming same like SAP61 or SAP62. Actual script & print values of SAP09 are replaced by SAP61 or SAP62.
    Please suggest us how we can differentiate both SAP09 & SAP61/62. Because we use these correspondences for different purposes like SAP09 gives the information for the Line items in the Document whereas SAP61/62 gives the information of vendor line item weather it is debit or credit entry.
    Your kind co-operation in this matter is highly appreciated.
    Thanks & Regards,
    Naveen Kumar.P

    "Assigned the from to the company code - progam in V_001F_B"
    Check 'Form ID' field in this IMG transaction against the program and form that you have created.
    I am assuming there are 2 lines with same entries but different form IDs.
    Or there are 2 lines with the same entries but different CoCodes (seem to remember that the CoCode is not taken into account as a key in certain programs - not logical i know but remembered a previous issue I had many moons ago - could be to do with the blank entry for CoCode field if there is one being picked up by the program before the entry that has your CoCode).
    Now check the variant attached and Form ID in step 'Created new program variants in SA38'
    Ensure the correct program and variant are attached in step OB78.
    My assumption is Form ID is the key.
    Hope this helps

  • Short Dump while activating Transformation through Program

    HI All,
    I am getting short dump while activating - Inactive Transformation through Program RSDG_TRFN_ACTIVATE.
    However while i can activate single Transformation but if run without selection, I am getting this dump.
    Short Description of Dump -
    Category          
    ABAP Programming Error
    Runtime Errors    
    ASSERTION_FAILED
    ABAP Program      
    CL_RSAR_FORMULAS==============CP
    Application Component  BW-WHM-DST
    Date and Time     
    Please Guide.
    Prasad

    Hi Prasad,
    Have you changed the 'Object Status' from INA to ACT when using the program RSDG_TRFN_ACTIVATE?
    You can also refer to the note SAP Note 1030987 - Activation of transformations dumps
    regards,
    Ashvin

  • Program Variant in Process Chain

    Hi All,
    I have to execute a program in a Process Chain. I have included a process variant to execute the program. Now, this program bring us to a screen, where we need to click on the execute button to run that program. I need to add a program variant for this i guess. Can any one give me the procedure how to do this?
    Points will be awarded.
    Thanks in advance,
    Anjum.

    The program that you have written should run in background.
    We use Variants for ABAP programs to be run in the Process Chain
    - Create an ABAP variant
    - Choose call mode "Synchronous", Called from "Local". Thats mostly the default we use. choose according to your requirement.
    - Choose "Program". Choose the program name & the variant n ame. Its better if you create the variant while testing the program in sa38. Later you can use the same variant in the Process Chain ABAp variant OR can create a new one. Set appropriate values.
    Please note that if in SA38, your program ran successfully with the variant, it should run here as well.
    That should do.
    Regards
    Anujit Ghosh
    Edited by: Anujit Ghosh on Jun 17, 2008 12:36 PM
    To create the program variant, first enter a name of your choice in the program variant field. Click Edit.
    - Choose Create New
    - Choose "Values". Click Change. In teh next screen, enter all the required parameters. Choose if its a SAP standard prog, or modified program.
    - Check the attributes as well. It will usually choose selection screen 1000 as default. Let it be.

  • Variant of program is not the current version

    Hi
    When the program started in CCS, it has been cancelled and giving the "Variant of program is not the current version" . how can i solve this and where ill get the soln for this type of error.
    Reply me asap
    thanks
    Umashankar

    you did not give much details about your problem. where you got this error, which program ? what are you trying to do ??
    If this is an ABAP Program,you can  always create a new variant directly in QA & PRD
    SE 38 > Progrma name > Execute (if you have selection screen) > enter your new selections > 'Goto' menu > Save as variant > give new name > Save
    If you dont have selection screen in your program
    SE 38 > Program Name > Change/ Display > Goto > Variants > Create
    Cheers
    Praveen

  • Request not visible in the version management of a Report Program

    Hi,
    We Imported an external request into the SAP System.
    The request was imported successfully and a program already existing is updated with that request,
    The problem is that the request number is not visible in the Version Management of the Report Program, but the other Programs have the request number visible in the version management, we could not find the request number in that  particular program
    We tried reimporting the request but the request is not visible.
    Regards

    Check the transport logs and see if there are any erros/warnings.

  • Defining Selection variables for program variant, TVARV table Help - urgent

    Hi All,
    Can anyone tell me, what is the transaction to create new variables in table TVARV to use them in my variant for fiscal year and WIP period fields in selection screen of SAPKKA07 program.I used STVARV and it creates variables in table TVARVC table not in TVARV table and moreover in creating a variant the selection variables are defaulted as variables from TVARVC table as input help but not the variables in TVARV table however I see and understand different from SAP Help. The following is the link
    http://help.sap.com/saphelp_47x200/helpdata/en/25/c966398ae5c13ae10000000a114084/frameset.htm
    for selection variable creation.
    Can anyone help me on this this is very urgent. Your help is highly appreciated
    Thanks in advance
    Kumar

    Thanks Appana,
    I know we can create the variable that way but, that is something hardway to do it. I want to go about it from transaction not meaning to update the table directly and moreover if I update the TVARV table directly as u said I still dont see the variable I created in the list I get on input help for selection variables while creating a program variant.
    I hope u can suggest me better now.
    Thanks
    Kumar

  • How to create WWWBinaryFileAsset through programming

    Hi, Could anybody provide me steps to create WWWBinaryFileAsset through programming.
    I followed below steps but i am getting error,
    MutableRepository pubRepository = getPublishingRepository();
    // pub repository is pointing to /atg/epub/file/SecuredPublishingFileRepository
    wwwBinaryFileAsset = pubRepository.createItem(filesProperties.getWwwBinaryFileAssetItemDescriptorName());
         if (wwwBinaryFileAsset != null) {
         wwwBinaryFileAsset.setPropertyValue(filesProperties.getFilenamePropertyName(), imageName);
         wwwBinaryFileAsset.setPropertyValue(filesProperties.getParentFolderPropertyName(), parentFolder);
         wwwBinaryFileAsset.setPropertyValue("content", new File("D:\\media\\images\\hmc\\Penguins.jpg"));
         pubRepository.addItem(wwwBinaryFileAsset);
    Thanks,
    Raj

    Hi,
    I am able to create project and adding binary file asset to the project with code as i copy/pasted in this query, after creation, also i am able to see the asset in BCC editor as well.
    I can say asset looks like as it was created in BCC editor, means there are nodifferences in assest properties which created through programming from asset created in BCC editor.
    I am not sure what i am missing. But only the problem is, i am getting the error when deploying project from BCC, error stack trace is,
    /atg/epub/DeploymentServer 14000002:Production:atg.deployment.adapter.DistributedDeploymentAdapter.pollTillDataApplied(DistributedDeploymentAdapter.java:2588) Polling Until Data Appplied
    /atg/deployment/DeploymentManager Starting deployment with id: 14000002
    /atg/deployment/DeploymentManager Executing deployment in LOCAL mode
    /atg/deployment/DeploymentManager item = fileMarker:mark7800001 cause = java.lang.IllegalArgumentException: Negative initial size: -1
    /atg/deployment/DeploymentManager at java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:57)
    /atg/deployment/DeploymentManager at atg.deployment.file.FileDeploymentCommandImpl.getUncompressedInputStream(FileDeploymentCommandImpl.java:398)
    /atg/deployment/DeploymentManager at atg.deployment.file.FileDeploymentCommandImpl.getInputStream(FileDeploymentCommandImpl.java:470)
    /atg/deployment/DeploymentManager at atg.deployment.file.DeploymentProtocolImpl.sendFileDeploymentCommand(DeploymentProtocolImpl.java:913)
    /atg/deployment/DeploymentManager at atg.deployment.file.DeploymentProtocolImpl.sendCommand(DeploymentProtocolImpl.java:179)
    /atg/deployment/DeploymentManager at atg.deployment.file.FileWorkerThread.runCommand(FileWorkerThread.java:716)
    /atg/deployment/DeploymentManager at atg.deployment.file.FileWorkerThread.processMarkerForAddUpdatePhase(FileWorkerThread.java:441)
    /atg/deployment/DeploymentManager at atg.deployment.DeploymentWorkerThread.processMarkerPhase(DeploymentWorkerThread.java:521)
    /atg/deployment/DeploymentManager at atg.deployment.DeploymentWorkerThread.run(DeploymentWorkerThread.java:300)
    /atg/deployment/DeploymentManager message = Deployment Failed time = Wed Jun 20 09:12:50 IST 2012 atg.deployment.DeploymentFailure@93d841 java.lang.IllegalArgumentException: Negative initial size: -1
    /atg/deployment/DeploymentManager at java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:57)
    /atg/deployment/DeploymentManager at atg.deployment.file.FileDeploymentCommandImpl.getUncompressedInputStream(FileDeploymentCommandImpl.java:398)
    /atg/deployment/DeploymentManager at atg.deployment.file.FileDeploymentCommandImpl.getInputStream(FileDeploymentCommandImpl.java:470)
    /atg/deployment/DeploymentManager at atg.deployment.file.DeploymentProtocolImpl.sendFileDeploymentCommand(DeploymentProtocolImpl.java:913)
    /atg/deployment/DeploymentManager at atg.deployment.file.DeploymentProtocolImpl.sendCommand(DeploymentProtocolImpl.java:179)
    /atg/deployment/DeploymentManager at atg.deployment.file.FileWorkerThread.runCommand(FileWorkerThread.java:716)
    /atg/deployment/DeploymentManager at atg.deployment.file.FileWorkerThread.processMarkerForAddUpdatePhase(FileWorkerThread.java:441)
    /atg/deployment/DeploymentManager at atg.deployment.DeploymentWorkerThread.processMarkerPhase(DeploymentWorkerThread.java:521)
    /atg/deployment/DeploymentManager at atg.deployment.DeploymentWorkerThread.run(DeploymentWorkerThread.java:300)
    /atg/deployment/DeploymentManager
    /atg/deployment/DeploymentManager Unexpected error occurred. DeploymentWorkerThread terminated prematurely. atg.deployment.DistributedDeploymentException: Exceeded allowable error count (0)
    /atg/deployment/DeploymentManager at atg.deployment.DeploymentWorkerThread.processMarkerPhase(DeploymentWorkerThread.java:626)
    /atg/deployment/DeploymentManager at atg.deployment.DeploymentWorkerThread.run(DeploymentWorkerThread.java:300)
    Thanks.
    Edited by: 938890 on Jun 19, 2012 9:09 PM

  • How to process batch input session through program

    Hi Friends,
    I am getting 5 batch input sessions in SM35,but  I want to process these all sessions through program without going to SM35.
    How it is possible through Program?
    Please Guide me!
    Thanks,
    Yogesh

    Hi,
    It's the report to run the batchinput sessions.
    When you create to B.I. session, you can execute it by transaction SM35 (but it uses rsbdcsub) or rsbdcsub.
    For example you can use it in the same program where you create B.I.:
    Here the code to fill the structures of FI batch input
    standard....
    ...here it creates session...
    SUBMIT RFBIBL00 WITH DS_NAME = VA_FILE
    WITH CALLMODE = CALLMODE AND RETURN.
    ....here it runs session....
    SUBMIT RSBDCSUB WITH MAPPE = P_NAME
    WITH VON = SY-DATUM
    WITH BIS = SY-DATUM
    WITH FEHLER = ' '
    TO SAP-SPOOL
    LIST NAME P_NAME
    LIST DATASET P_NAME
    COVER TEXT P_NAME
    NEW LIST IDENTIFICATION ' '
    EXPORTING LIST TO MEMORY
    AND RETURN.
    regards,
    Shiva.

  • How create the SMQ2 error through program ?

    Hi all,
    How create the SMQ2 error through program ?
    Any idea ... plsease share.
    Regards,
    Srikanth

    Hi juturusrikanth ,
    which one is the SMQ2 error?
    [FAQ's, intros and memorable discussions in the ABAP General Forum|FAQ's, intros and memorable discussions in the ABAP General Forum;
    [How to post code in SCN, and some things NOT to do...|How to post code in SCN, and some things NOT to do...;
    Regards
    Clemens

  • Cancel Technical Completion of a TECO'd service order through program

    Hi All,
    In IW32 transaction for a service order I need to Cancel the Technical Completion.Menu path is
    Order>Functions>Complete-->Cancel Technical Completion. How can I do this through program.I tried the FM status_change_intern. But its not working. Any one please give a solution.
    Thanks,
    Neethu.

    Hi,
    Try with a BDC to cancel it.
    Regards
    Sabu.

  • Problema con el programa es que cuando aparentemente se instalo me dice otra pantalla que el programa esta recopilando informacion necesaria para quiktime y ahi se detiene, ya eh desinstalado el programa varias veces y no consigo que se solucione

    el problema es que bo puedo intalar el programa , me dice otra pantalla que esta recopilando informacion necesaria de quiktime y ahi se queda , ya he desinstalado el programa varias veces y no consigo que corra adecuadamente

    Olá,
    Para liberar a memória ram feche a referência do arquivo e abra novamente de forma periódica. Senão fizer isso e um problema acontecer você irá perder os dados coletados.

Maybe you are looking for

  • Formatted Windows iPod Classic 3rd gen sync with Mac iTunes?

    I have a iPod Classic 3rd gen 10gb formatted for windows running version 2.2 and iTunes on Mac version 10.6.3. I want to sync the ipod to itunes via usb to 30 pin cable but itunes does not recognise the ipod. Is there any other way for me to sync the

  • Missing albums and ibooks

    Recently, after opening iphoto 6 I found all of my albums, books, and folders missing. The only thing I can think of that would affect those would be the recent auto update iphoto asked me to install. I can create new albums and import files as usual

  • Will a different language font print OK on Christmas Cards?

    Hi There, I have a non-english font on my mac, which works perfectly fine in all applications. I was able to choose this font for my Christmas card design in iPhoto 9.1 and it shows properly on the screen. My question is when the design goes to print

  • [OrgChart] Change of position type depending on employees underneath

    Hello, I have a question regarding the OrgChart Add-In. When importing from Excel all employees are created as Executives / Managers / Positions, depending where they stand in the hierarchy. Is there a way to assign the position "Staff" to employees,

  • Dreamweaver CS6 french doesn't open on windows 8

    Hello everyone, since a week, dreamweaver doesn't open on my computer, I am on windows 8,  dreamweaver CS6 French version I don't really what to know, I am a novice. Please explain to me what to do Thanks a lot