Select query in driver program for sapscript

Hi All,
I want to select buzei, zuonr,sgtxt,meins from bseg ,temp (a temporary variable of type p deciamls 2), tmp (another temporary variable) and dmbtr from HBSEG (a structure of type bseg) . under the cond
koart ne 's' or
xauto ne 'x' or
buzid ne 't'.
I have to write this select query usinf a WORKAREA . After this select query i give WRITE_FORM as i call there vairables in script.Its very urgent.
thanks much

Hi,
You can use inner join. Consider this simple example.
data : a type zvijirank occurs 10 with header line,
          b type zvijirank1 occurs 10 with header line.
data : name like zvijirank-name,
       total like zvijirank1-total,
       reg_no like zvijirank.
*       regno type i.
data : begin of wa,
       name type zvijirank-name,
       total type zvijirank1-total,
       branch type zvijirank1-branch,
       reg_no type zvijirank-reg_no,
*       FNAME TYPE ZVIJIRANK2-F_NAME,
*       MNAME TYPE ZVIJIRANK2-M_NAME,
*       CITY TYPE ZVIJIRANK2-CITY,
*       TEL_NO TYPE ZVIJIRANK2-TEL_NO,
       end of wa.
data : it like standard table of wa with header line,
         it1 like standard table of wa with header line.
call selection-screen 9010.
select a~name b~total b~branch a~reg_no into table it from zvijirank as a inner join zvijirank1 as b on a~reg_no = b~reg_no .
loop at it.
if it-reg_no eq regno.
write : 'NAME   :', it-name,
        'REG_NO :', it-reg_no,
         'TOTAL :', it-total.
ENDIF.
endloop.
Thanks,
Reward If Helpful.

Similar Messages

  • U00BFCan I use a function module as a driver program for sapscript?

    Hi,
    I have to use a function module as driver program for sapscript and there is no any value in the form (the data are not transferred)...
    but if I call the sapcript from a report with the same code as in my function module all the data are transferred OK.
    please, can you tell me if there is any problem in use of a function module in this case? is it impossible at all or is there any tip to apply?
    thank you all in advance.

    Hi,
    first of all it is possible to use a function module to process a SapScript form.
    The mistake on your side is probably the definition of the variables that you want to pass to the form. Please make sure they are defined as global (via SE37 --> Goto --> Global Data) then it should be working.
    In addition you could take a look at e.g. function module "PRINT_DUNNING_NOTICE". This is SAP standard and they are using it to print a SapScript form.
    Best regards
    Arno Speitkamp

  • Driver program for Sapscript form

    Hi All,
    My Sapscript Z From has been configured for company code,and it is present in table T042B.
    T042B-ZBUKR = 4418 (company code)
    T042B-AFORN = ZCOTL_ADVICE (SAPSCRIPT FORM)
    Can anyone please tell me from which table I should get the Driver Program for the above Sapscript Form.
    Kindly Reply ASAP.
    Rishi

    Hello Rishi,
    Could you please let us know how did you find the driver program for the forms in FICO
    Thanks,
    Smita

  • Driver program for BIll of lading smartform

    Hi all,
    Can you please provide me the standard driver program for bill of lading smartform.
    or for purchase order smartform.
    Thanks and regards,
    Rajeev

    Hi,
      For Purchase Order - SAPFM06P.
    And for future info,
      If you Know the Application and Output Type - Then it is very easy to know the Smartform or the Script Used.
    1.Go to NACE and Check.
      For Ex: PO belong to APP type EF, So click on EF and then click on "Output Type " button.
                  Then all the output types will be displayed.Then select the required and Click on "Processing Functions". Then you can see the Configuration details done for this ouput type like which smartform, which subroutine.
    2.Also, You can check the TNAPR table entries by entring the below information
    Output Type, Message transmission medium, Application.
    Thanks & Regards,
    Vamsi.

  • Driver program for Sale Order

    Hi all,
    Can any body tell me Standard Driver program for Sale Order Smart form?
    Useful answer will be rewarded
    Thanks in advance,
    Sachin.

    Hi Sachin,
    you can do this by,
    <b> NACE</b> (tocde) -->  select  <b>Sales</b> --> click <b>output types</b> -->
    select any standard output type --> double click on processing routines.
    You can see the program name
    For this it is -
    <b>RVADOR01</b>
    Reply me if there is any queries

  • Driver program for the Dunning letter SAP Script

    Hello All,
    Can someone please tell me how to find the "Driver program for the Dunning letter SAP Script". I checked the Transaction OB96 but I dont find any Dunning scripts here i.e., the standard Dunning letter SAP Script F150_DUNN_01.
    Is there any Transaction like NACE of logistics for FI module to find the Driver programs. My requirement is to find the Driver program for the Dunning letter SAP Script and have a new Driver program instead of the standard SAP given driver program. Example is in transaction NACE we can change the driver program for Invoice like from RVADIN01 to ZRVADIN01.
    Thanks and Regards,
    SNK.

    Yes you can, using FIBF, change the FM associated with event 1720 like when SapScript is replaced with SmartForms. Look at [Define Dunning Forms (with SAP Smart Forms)|http://help.sap.com/saphelp_46c/helpdata/es/7d/c7a0a535e1d311ba4d0800060d888b/content.htm] for reference.
    But notice
    - PRINT_DUNNING_NOTICE call many FM of the same FG which share the same global data area.
    - During following upgrades of your system you will have to manage a copy of standard.
    Regards,
    Raymond

  • Can we change the value of a variable in the driver program from sapscript?

    Hello Experts,
    I am currently developing a form wherein I need to change the value of a variable defined in the standard
    driver program through the sapscript form. Unfortunately, I cannot customize this standard program since this is used by many other
    subsidiaries. So, is there anyway that I can change a variable defined in the driver program via sapscript?
    I tried to use a PERFORM to change its value but it is not working.
    I hope you can help me guys. Thank you and take care!

    SAP SCRIPT:
    /: PERFORM GET_ATTNDEE_INFO IN PROGRAM ZHR_TRNG
    /: USING &PPVAR-EOBJD&
    /: CHANGING &ATTND&
    /: ENDPERFORM
    Executable Prog.:
    REPORT ZHR_TRNG.
    FORM GET_ATTNDEE_INFO TABLES IN_PAR STRUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA : LOC_CODE(8),
    WF_NAME LIKE PA0001-ENAME, "----Location Code
    WF_SOBID LIKE HRP1001-SOBID. "----Business Event Code
    DATA: BEGIN OF ITAB_ECODE OCCURS 0,
    ECODE(8),
    END OF ITAB_ECODE.
    DATA: NAME1 TYPE STRING.
    READ TABLE IN_PAR INDEX 1.
    LOC_CODE = IN_PAR-VALUE.
    SELECT SOBID FROM HRP1001 INTO WF_SOBID
    WHERE OBJID = LOC_CODE AND OTYPE ='E' AND PLVAR = '01' AND SCLAS = 'P'.
    APPEND WF_SOBID TO ITAB_ECODE .
    ENDSELECT.
    IF SY-SUBRC = 0.
    LOOP AT ITAB_ECODE.
    SELECT SINGLE ENAME FROM PA0001 INTO WF_NAME
    WHERE PERNR = ITAB_ECODE-ECODE ." AND ENDDA >= '31.12.9999' .
    CONCATENATE 'Mr ' WF_NAME ',' NAME1 INTO NAME1.
    IF SY-SUBRC = 0 .
    OUT_PAR-NAME = 'ATTND'.
    OUT_PAR-VALUE = NAME1.
    APPEND OUT_PAR.
    ENDIF.
    ENDLOOP.
    ENDIF.
    ENDFORM. "GET_USR_INFO

  • Standard driver program for sale order

    i am working with sale order confirmation,(smartforms)
    is there any pre defined driver program for this.Not RVador01/
    and i need to display the output in the form of a print out or PDF for sending the mail.
    So please give me the logic for this.

    Hi,
    have a look at table <b>TNAPR</b> to check the print program assigned to your smartform/sapscript.
    Best regards.

  • Dump in smartform driver program for purchase order

    i created one smartform with driver program for purchase order.
    in smartfrom i gave
    form interface: p_ebeln as import,   
                        tables as it_ekpo like ekpo.
    global definitions are
    wa_ekko type ekko for printing the  ekko data in one window,
                                           wa_ekpo type ekpo .
    in main window i took  the  one table and loop the ekpo table for  printing the item details.
    no errors is there.but ; when i call this generated function module to my driver program it goes to dump.
    in driver program i declare structures,internal tables,work areas, and parameter as p_ebeln .
    and also select statements for my table all are good.but its not work.
    in function module i pass the details as export p_ebeln = p_ebeln and table it_ekpo  = it_ekpo.
    and also i done debugging in this data come to the internal table and work areas.
    but it goes to dump.
    if u dont mind plz solve my problem.
    Thanks
    Navya.
    Moderator message: empty lines removed, subject corrected, please use meaningful subject lines when posting!
    Edited by: Thomas Zloch on Mar 24, 2011 10:10 AM

    Hi Navya,
    Your smartform is correct. But, as per my understanding, the dump comes when you call the smartform from the driver program. If that is the case, please check the input parameters and all th parameters in the program should be same as used in samrtform. Any deviation would lead to a dump.
    Analyse and resolve!!!
    Regards
    Atul Sachdeva

  • Driver Program For Withholding tax(USA) Smartform 'idwtcert_us_1099misc1'

    Hai friends,
       i need to print withholding taxes(USA) by using the smartform 'idwtcert_us_1099misc1'. for this purpose
    for driver program i checked in tnapr table. & i have checked in sap Img Path also. but i am unable to find it.
    so please help in this regaurd. & i want to know how to find driver programs for standard FI smartforms.

    Hi Wayne,
    We opened a note with SAP and were told that a US 1042s copy could not be used within the standard system.  Looking into it further we found that the form name was coded into a selection program.  We had an ABAP developer add code that allows us to use a "Z_"  copy form. 
    Regards,
    Gregg

  • Smart form driver program for VF23

    hi any one can tell me is there a standard driver program for a smartform to run  transaction VF23. There is a Standard SAP script program named RVADIL01 . Is there a similar driver program for Smartform for the same Invoice List Transaction .

    Hi swathi,
    Yes based on conditions you can print the smartform in the driver program.
    SELECTION-SCREEN BEGIN OF BLOCK block  WITH FRAME.
    PARAMETERS:
    p_vintag  RADIOBUTTON GROUP rad1,
    p_contag RADIOBUTTON GROUP rad1,
    p_rmctag  RADIOBUTTON GROUP rad1,
    p_rfrtag  RADIOBUTTON GROUP rad1.
    SELECTION-SCREEN END OF BLOCK block.
       IF sy-subrc EQ 0.
    *"For Vintag smartform................................................
        IF p_vintag EQ 'X'.
          w_form = 'Y_HFA_VINTAG'.
    *"For Containertag smartform..........................................
        ELSEIF p_contag EQ 'X'.
          w_form = 'Y_HFA_CONTTAG'.
    *"For Remanufacturedtag smartform.....................................
        ELSEIF p_rmctag EQ 'X'.
          w_form = 'YH_HFA_REMAC'.
    *"For Reefertag smartform.............................................
        ELSEIF p_rfrtag EQ 'X'.
          w_form = 'YH_HFA_REEFER'.
    Regards,
    Sravanthi

  • Standard driver Program for Request for Quotation

    Hi All,
              If we want to know the standard driver program we can see in Nace.but i want standard driver program for RFQ i am unable to find it in NACE.Any help is greately appreciated.
    Thanks,
    Kiranmayi.

    Hi,
      Follow the Below Steps
    1.Goto NACE Transaction.
    2.Displays all the Application Types,Select EA - Purchasing RFQ.
    3.Select "Output Types" button.
    4.Displays all the "Output Types", select the required one and click on the "Processing Routines" appearing on the Left hand side.
    then you can see all the information such as Program, Routine, Smartform, etc....
    Thanks & Regards,
    Vamsi.

  • Driver program for scripts

    is there a way of finding out if a given program is a driver program for scripts.
    reply asap.
    points will be rewarded.

    Hi..
    You can find the link between the Form and the Print program in Table <b>TNAPR</b>.
    <b>Fields</b>
    FONAM  -> FORMNAME
    PGNAM -> PROGRAM NAME
    The other way to find is Open the Text elements of any window
    and Select the Menu path Sytax->check
    <b>Reward if Helpful</b>

  • Print(Driver) Program for HRTMC_TALENT_PROFILE_PDF

    Hi Friends,
    Can anyone please help me to find out the Print(Driver) Program for the adobe form .HRTMC_TALENT_PROFILE_PDF.
    Like scripts will be maintained in NACE where driver program and form will be maintained for Adobe Form?
    Regards,
    Sree

    Hi,
    have a look at table <b>TNAPR</b> to check the print program assigned to your smartform/sapscript.
    Best regards.

  • Smart form and its driver program for sales order

    Hi Experts,
    Please give me the standard Smart Form name along with its Standard driver program.
    I already have RVADOR01 program which is a driver program for SAP Script RVORDER01.
    But I need standard smart form with its standard driver program for VA02, VA03 (Sales order) transaction.
    <REMOVED BY MODERATOR>
    Thanks In Advance
    Ram
    Edited by: Alvaro Tejada Galindo on Apr 8, 2008 12:10 PM

    Hi Ramachandra Babu,
                  Welcome To SDN!!
    Check output types in NACE tcode...
    Sample example,
    Goto Transaction NACE --> Select Application V1(Sales) --> Click on Output Types --> Select the output type as BA00 (as generally BA00 is the output type associated with Sales Order ) --> Double click on the Processing Routines folder on the left and it will display the Form name and the corresponding driver programs name.
    Regards
    Kiran

Maybe you are looking for