If statement in Sap BODS

How the below syntax is correct for an IF statement inside a script?
If(<Condition>) <True>; else <False>
Please explain with an example.
Thanks in advance.

Hello,
Just to complete with the informations given by Venkata Ramana Paidi
You can implement it by writting this following code :
if(condition = true)
     begin
          print('the condition is true');
     end
else if(anotherCondition = true)
     begin
          print('another condition is true');
     end
else
     begin
          print('all above conditions are false');
     end
Hope it will be helpful for others,
Best regards,
David.

Similar Messages

  • If Statement in SAP Scripts

    Hi All,
    I have written the below If statement in  SAP scripts but when i execute the same the controll doent check the second line entries. If firtst line doesnot satisfy it goes to the else part. Kindly suggest what is wrong in this..
    /:           IF &T156T-BWART& = '321' OR &T156T-BWART& = '322' OR
    /:           &T156T-BWART& = '349' OR &T156T-BWART& = '350' OR
    /:           &T156T-BWART& = '312' OR &T156T-BWART& = '326' OR
    /:           &T156T-BWART& = '343' OR &T156T-BWART& = '344'.
    /:           ELSE
    /:           ENDIF.

    Hi neha,
    Try to use the '/E' fo rnext line
    /E->Extended line
    Here is a code:
    /: IF &T156T-BWART& = '321' OR &T156T-BWART& = '322' OR
    /E  &T156T-BWART& = '349' OR &T156T-BWART& = '350' OR
    /E  &T156T-BWART& = '312' OR &T156T-BWART& = '326' OR
    /E &T156T-BWART& = '343' OR &T156T-BWART& = '344'.
    /: ELSE
    /: ENDIF.
    Hope this helps you.
    Regards,
    Rajani

  • Use of IF statement in SAP Scripts

    Can u tell me how to use IF statement in SAP Scripts.
    The problem is
    if &sy-tabix& eq '1'
    total
    else
    total1.
    endif.
    this sy-tabix is not working

    i think sy-tabix will not work here....
    do like this..
    data : vtabix type i.
    loop at itab.
    vtabix = sy-tabix.
    write_form...for the text element..
    endloop.
    in form layout
    /: if &vtabix(c)& eq 1
    /:endif
    regards
    shiba dutta

  • Using the Execute Preloaded Option for ABAP Dataflows in SAP BODS

    Hello All,
    This is regarding the use of Advanced Option in SAP Application Type (ECC) Datastore settings in SAP BODS 4.2, where there are two options to select from for ABAP Execution Option property: (1)Generate and Execute and (2) Execute Preloaded. Since our ECC client is often locked by BASIS team even on DEV environment, we would like to make use of the second option 'Execute Preloaded' so that we could extract the data from ECC tables without having to ask the BASIS team to unlock the ECC client every time before extraction.
    The problem is that we are getting an error upon generating and uploading the ABAP program to ECC client. I have searched the blogs and so far I have only found that there are certain ABAP programs or function modules that come with SAP BODS which need to be installed by BASIS team on ECC side to allow the ABAP dataflows to be generated and uploaded to ECC server. I would appreciate it if anyone could provide a list of which function modules BASIS needs to install on ECC or a blog that provides details around using this option.
    So far, from the SAP BODS designer, we are performing below steps but getting an error upon generating and uploading the ABAP dataflow program:
    1. Create a test ABAP Dataflow using SAP ECC datastore. Provide the ABAP program options.
    2. Right click, select Generate ABAP Program.
    3. Once the ABAP Program Generation Dialog box appears, check the box "Upload Generated Program".
    4. Upon clicking OK, we are getting the following error:
    The ABAP program <ZRTEST01> for ABAP data flow <RT_TEST_R3> (datastore <R3_DS>) was not uploaded: < RFC CallReceive error <Function /BODS/RFC_ABAP_INSTALL_AND_RUN: RFC_ABAP_MESSAGE- Exception condition "NOT_SUPPORTED_BY_GUI" trigger[SAP NWRFC 720][SAP Partner ### ][clientname][servername][accountname][4103]>. >.
    Any help would be greatly appreciated.
    Thanks,
    Rizwan

    All,
    The BASIS team reviewed steps provided in the BODS document and attempted to install the Function Modules but now none of the BODS jobs would work. All BODS jobs are being terminted with the Syntax Error error when extracting data from ECC using ABAP dataflows:
    17740 16404 R3C-150412 06/17/2014 9:38:46 AM |Data flow RT_DF_TEST_PC207
    17740 16404 R3C-150412 06/17/2014 9:38:46 AM RFC CallReceive error <Function /BODS/RFC_ABAP_INSTALL_AND_RUN: RFC_ABAP_RUNTIME_FAILURE-(Exception_Key: SYNTAX_ERROR)- Syntax
    17740 16404 R3C-150412 06/17/2014 9:38:46 AM error in program /BODS/SAPLBODS                          .[SAP NWRFC 720][SAP Partner 740 ][DEV1][Server][account][4103]>.
    22052 20572 R3C-150412 06/17/2014 9:38:46 AM |Data flow RT_DF_TEST_PC207
    22052 20572 R3C-150412 06/17/2014 9:38:46 AM RFC CallReceive error <Function /BODS/RFC_ABAP_INSTALL_AND_RUN: RFC_ABAP_RUNTIME_FAILURE-(Exception_Key: SYNTAX_ERROR)- Syntax
    22052 20572 R3C-150412 06/17/2014 9:38:46 AM error in program /BODS/SAPLBODS                          .[SAP NWRFC 720][SAP Partner 740 ][DEV1][Server][account][4103]>.

  • How to use perform statements in sap scripts

    how to use perform statements in sap scripts . and pls send me one progam for this
    thnaks
    raja

    Hi Raja,
    <b>PERFORM</b> key work is used to include subroutine in sapscript form...
    But the processing is lttle bit different form the one we use in ABAP.
    Here the paramters passed to form is stored in internal table of name-value table. there are two table one for inbound parameter and other for outbound parameters.
    Check out the example below to see how this is used..
    <b>Definition in the SAPscript form:</b>
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    <b>Coding of the calling ABAP program:</b>
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY ‘PAGE’.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY ‘NEXTPAGE’.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE OUT_PAR WITH KEY ‘BARCODE’.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = ‘|’. "First page
    ELSE.
    OUT_PAR-VALUE = ‘||’. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = ‘L’. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Hope this is clear to understand...
    Enjoy SAP.
    Pankaj Singh.

  • How to debugg particular statement in sap script

    hi friends,
    i want to know How to debugg particular statement in sap script.
    plz reply.
    thanks in advance,
    regards
    bhaskar

    hi
      execute rstxdbug to activate script debugger...once the driver program reaches open_form, a popup box will come where u can mention the name of a command, call functinon, text element, etc to place a break point...once it gets into the debugging mode, double click on any line to set a break point, after that pressing f8 will get you to that line
    if helpful, reward
    Sathish. R

  • I can´t edit the text files with SAP BODS 3.2

    Hello
    I can not edit some text files 9-20 megabytes to replace two words in each file, the source is a text file and the same destination but with different name, because with the same name have been unable . My idea is to remove the original and stay with the new performing edition but that if he does , let me file this way:
    SALES_ORDERS_FULL_20140223_150051_006.xml ( ORIGINAL )
    should leave it with me so : SALES_ORDERS_FULL_20140223_150051_006.xml _OLD (AMENDED )
    but strangely leaves me so :
    MICROSOFT_SQL_SERVER_KCC-BI_REPO_KHSA_XI_REPO_KHSA_XI_1543_5434_2_3_Long_INVOICES_INCREMENTAL_20140225_034004_001_xml_dat.txt  (not deseased)
    The type of data you use is long since varchar not allow me because it cuts my data file , use varchar (50000000) but takes the information and short .
    I am using long data type , modify the file and I pass the name of the text files of sap bods for global variables. They are a series of files that are called by a while loop
    Thanks for your answers
    regards

    HIr
    Yes, first I convert long_to_varchar for edit, and convert varchar_to_long.
    I edit before before and later
    Thanks

  • Error in opening SAP BODS 4.2 Management Console

    Hi All,
           I am getting the below error when I tried to open the Management Console in SAP BODS 4.2 SP1. Please help. Error is attached.

    Hi,
    Go to BIP Server->services.msc->Business objects data services->stop and restart the services.
    For Tomcat also stop and restart the services.
    Regards,
    Narasimha.

  • SAP BODS and SAP APO

    Hi
    Can some one guide me on How to extract SAP APO Data in to BODS?
    regards
    Raj

    Hi Rajeev Parimi,
    Create a RFC connection in SAP Data Services Management Console for your SAP APO.
    Provide required details.
    Log into your SAP APO
    Provide T-Code SM59
    Create a RFC connection. Provide Registered Server Program name(RFC ProgramID Created In DS Management Console).
    Save the connection and then test the connection.
    Now log into Data Service Designer
    Go to Local Object Library and select Datastores Tab.
    Right Click and Select New
    Then select Data Transfer Method as RFC and provide your RFC Name.
    Provide all the required fields.
    select OK
    Note: RFC Data Transfer Method is available from SAP BODS 4.1 Version
    Regards,
    Akhileshkiran.

  • Is it possible to see cash flow statement in sap fico ? ;How

    Is it possible to see cash flow statement in sap fico ? ;How

    Re: Cash Flow statement
    Forum Rule: Please search the forum before posting a thread.

  • GETTING ERROR IN SAP BODS : 230102

    Dear Expert ,
    I am New in SAP BODS,I am getting below Error in SAP BODS.
    Data Flow terminated due to error <230102>
    We are transfering data from MS SQL to SAP BW.
    Please tell me how to resolved it
    Many Many Thanks In Advance.
    Regards,
    Divyesh Patel
    (9930578182)

    Hi Divyesh,
    Have you tried to set the TTL (Time to live or Timeout) for Port of BW to 3600 seconds,that may solve your problem.

  • Is SAP BODS the best ETL tool for a complex BI Environment

    Hi All
    We are in the process of rationilising our BI / Analytics environment.
    We currently have SAP ECC6 as our ERP system, SAP BW as our Warehouse and BO for WEB and Dashboard fron ends. In additon we have a small instance of COGNOS which is largely fed with flat file loads but some Oracle and ECC6 data.
    In addition we are evaluating Big data solutions with Teradata the current lead.
    We are in danger of having multiple ETL tools associated with the main BI applications and so we are comparing SAP BODS with IBM Datastage with a view to slecting one of them as our only ETL tool.
    Does anyone have any compatability information for SAP BODS with Cognos and Teradata? The main function required would be extracting from ECC6 into SAP BW, Cognos and Teradata.
    Thanks
    Jerry

    Hi Jerry,
    Cognos is a presentation tool so no worries as far integration is concerned.
    As far teradata is concerned, kindly see the following doc:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30a4caa2-ce7f-2e10-5291-c484df6be4af?QuickLink=index&overridelayout=true&51591147160102
    Best Regards
    Certified SAP Data Services Consultant

  • Can we publish Flows as Web Services in SAP BODS ? How ?

    Hello Friends,
    Can we publish Flows as Web Services in SAP BODS ? How ?
    Best Regards,
    Bheem.

    Hello
    Batch jobs and real-time services can be published via the Data Services web service.  See the Integrator Guide for full details - http://help.sap.com/businessobject/product_guides/sbods42/en/ds_42_integrate_en.pdf
    Michael

  • While loading data I am getting Access violation process dump option is off in sap bods

    Hi All,
    I extracting the data from ECC table and loading it in ORACLE table SAP BODS tool.
    While starting the extract itself i am getting the error like below,
    6628
    8592
    SYS-170101
    24-Apr-15 9:41:20 PM
    System Exception <ACCESS_VIOLATION> occurred. Process dump option is off. Process is not dumped.
    Kindly help me to over this error.
    Thank you,
    Regards,
    Vinodh Seemakurthi

    This can be caused by many things, I recommend searching SAP Support Portal for ACCESS_VIOLATION and using the Call Stack to track down the specific issue.
    e.g.,
    Call stack:
    0x000000008052DDAD, Exec_frame::addr()+0013 byte(s),
    0x00000000801D0966, XDataflow_desc::initialize()+0358 byte(s),
    0x00000000801D2DEA, XDataflow_desc::executeInline()+0122 byte(s),
    0x00000000801DE0FD, XDataflow_info::execute()+0925 byte(s),
    0x00000000801CFC52, XDataflow_desc::execute()+0114 byte(s),
    0x0000000080073756, AE_Main_Process_Options()+61558 byte(s),
    0x00000000800840C6, AE_Main()+3238 byte(s),
    Exception code: C0000005 ACCESS_VIOLATION
    Fault address:  000000018052DDAD 01:000000000052CDAD G:\Program Files (x86)\SAP BusinessObjects\Data Services\bin\acta.dll

  • Scripts in SAP BODS 4.0

    Hi Everybody,
    Can i use Scripts as is in SAP BODS 4.0?
    Recentaly we have installed new version on SAP BODS 4.0 from SAP BODS 3.1. We have migrated all the related jobs, datastores and all the related stuff.
    When i try to validate one job in new version then at scripts, i was getting an error on using SQL() functions.
    While working on the function in scripts, do we need follow any procedure?
    Please let me know.
    Thanks,
    Mohammed.

    Check whether you have the rep_funcinfo.atl under "C:\Program Files\Business Objects\BusinessObjects Data Services\Admin\Repo" folder.
    If not then bring that atl file in the specified folder.
    I hope, it will work.

Maybe you are looking for