Program using BAPI and selection screens

program to compare two infoobjects using BAPI and selection screen in ABAP

BAPI-step by step procedure
http://www.sapgenie.com/abap/bapi/example.htm
list of all BAPI's
http://www.planetsap.com/LIST_ALL_BAPIs.htm

Similar Messages

  • Call Program from another Program using varient via Selection Screen

    I am calling a standard report from my Z Program via Selection screen.
    Is there any way to hide the Execute button that is seen when we see the called program selection screen?

    Hi Shyam,
                      Thanks for the quick reply.
    But my requirement is to show the selection screen of called program as i need to make some values changes in the selection Screen.
    However, the user can accidently click the execute button which i dont want thats why i need to hide the execute button.
    My aim is to change values of selection screen but nto execute it.
    Is it possible?

  • Screen shots of lsmw using bapi and idoc.

    hi
    can anybody plz send me the step by step lsmw procedure using
    bapi and idoc screen shots.
    regards
    vijay

    Refer this link... it has step by step procedure with screen shots....
    http://www.****************/Tutorials/LSMW/LSMWMainPage.htm
    Regards,
    Pavan

  • Reading XML file using BAPI and then uploading that xml file data into SAP

    I am getting a xml file from Java server. I need to take
    data from this file using BAPI and need to upload into SAP using SAP.
    Please tell me how to read XML files using BAPI's.

    <b>SDIXML_DATA_TO_DOM</b> Convert SAP data (elementary/structured/table types) into DOM (XML
    <b>SDIXML_DOM_TO_XML</b>  Convert DOM (XML) into string of bytes that can be downloaded to PC or application server
    <b>SDIXML_DOM_TO_SCREEN</b> Display DOM (XML)
    <b>SDIXML_DOM_TO_DATA</b>
    data: it_table like t001 occurs 0.
    data: l_dom      TYPE REF TO IF_IXML_ELEMENT,
          m_document TYPE REF TO IF_IXML_DOCUMENT,
          g_ixml     TYPE REF TO IF_IXML,
          w_string   TYPE XSTRING,
          w_size     TYPE I,
          w_result   TYPE I,
          w_line     TYPE STRING,
          it_xml     TYPE DCXMLLINES,
          s_xml      like line of it_xml,
          w_rc       like sy-subrc.
    start-of-selection.
      select * from t001 into table it_table.
    end-of-selection.
    initialize iXML-Framework          ****
      write: / 'initialiazing iXML:'.
      class cl_ixml definition load.
      g_ixml = cl_ixml=>create( ).
      check not g_ixml is initial.
      write: 'ok'.
    create DOM from SAP data           ****
      write: / 'creating iXML doc:'.
      m_document = g_ixml->create_document( ).
      check not m_document is initial.
      write: 'ok'.
      write: / 'converting DATA TO DOM 1:'.
      CALL FUNCTION 'SDIXML_DATA_TO_DOM'
        EXPORTING
          NAME               = 'IT_TABLE'
          DATAOBJECT         = it_table[]
        IMPORTING
          DATA_AS_DOM        = l_dom
        CHANGING
          DOCUMENT           = m_document
        EXCEPTIONS
          ILLEGAL_NAME       = 1
          OTHERS             = 2.
      if sy-subrc = 0.  write  'ok'.
      else.             write: 'Err =', sy-subrc.
      endif.
      check not l_dom is initial.
      write: / 'appending DOM to iXML doc:'.
      w_rc = m_document->append_child( new_child = l_dom ).
      if w_rc is initial.  write  'ok'.
      else.                write: 'Err =', w_rc.
      endif.
    visualize iXML (DOM)               ****
      write: / 'displaying DOM:'.
      CALL FUNCTION 'SDIXML_DOM_TO_SCREEN'
        EXPORTING
          DOCUMENT          = m_document
        EXCEPTIONS
          NO_DOCUMENT       = 1
          OTHERS            = 2.
      if sy-subrc = 0.  write  'ok'.
      else.             write: 'Err =', sy-subrc.
      endif.
    convert DOM to XML doc (table)     ****
      write: / 'converting DOM TO XML:'.
      CALL FUNCTION 'SDIXML_DOM_TO_XML'
        EXPORTING
          DOCUMENT            = m_document
        PRETTY_PRINT        = ' '
        IMPORTING
          XML_AS_STRING       = w_string
          SIZE                = w_size
        TABLES
          XML_AS_TABLE        = it_xml
        EXCEPTIONS
          NO_DOCUMENT         = 1
          OTHERS              = 2.
      if sy-subrc = 0.   write  'ok'.
      else.              write: 'Err =', sy-subrc.
      endif.
      write: / 'XML as string of size:', w_size, / w_string.
      describe table it_xml lines w_result.
      write: / 'XML as table of', w_result, 'lines:'..
      loop at it_xml into s_xml.
        write s_xml.
      endloop.
      write: / 'end of processing'.
    end of code
    Hope this will be useful.
    regards
    vinod

  • How to save varaint in a report program with tabstrip in selection-screen

    Hi Gurus,
    We have a custom report program and selection screen of this program has a tabstrip of 9 tabs. This program will run in background job and we are facing problem to save variant for this report program. 
    We saved one variant with 'TAB2' populated. But when we execute the report and select that variant and we are not navigated to 'TAB2' automatically. So, code for TAB2 is not triggerd and we are not getting desired output.
    When we set this program with variant in Job, program is not navigated to 'TAB2' as per variant setup.
    Is there any way to save variant for this kind of report ?
    Please help with your suggestions
    Thanks & Regards
    Chandan

    Thanks for your help.
    I found during debugging that it is holding the sy-ucomm of the first tab as default value.  So, I declared a new field in selection screen with No-Display option. When user will select a tab, this new field will hold the value of that sy-ucomm. As this field is in selection screen, it is getting stored in variant also.
    In start-of-selection of program I am checking this field value and accordingly set the TABSTRIP.
    Thanks again for your help.....
    Regards,
    Chandan

  • Using checkbox at selection screen

    I used checkbox at selection screen and i want output as per selected checkbox. How to do that??

    hiii
    use following code
    AT SELECTION-SCREEN.
      IF p_char EQ 'X'.
        w_check = 'X'.
        WRITE: w_check.
      ELSE.
        w_check = ' '.
        WRITE: w_check.
      ENDIF.
    SELECT b~carrid                      "Carrier Id
             b~connid                      "Connection id
             b~fldate                      "Flight date
             b~price                       "Price
             b~currency                    "Currency
             b~seatsmax                    "Maximum Seats
    INTO TABLE t_flight
    FROM spfli AS a
           INNER JOIN sflight AS b ON a~carrid = b~carrid
          INNER JOIN sbook AS c ON c~carrid = b~carrid AND
                                           c~connid = b~connid AND
                                           c~fldate = b~fldate
              WHERE b~carrid IN s_carrid AND
                              c~cancelled EQ w_check.
    regards
    twinkal

  • Include and selection screen

    Hi Experts ,
         i have a problem regarding include and selection screen.
    i have an include program , in which i have  defined my selection screen. and this include has been called in many program .
      but problem is that i have to maintain selection text and text element for every program .
    is there any way ....that i have a single selection text and text element for every program ...in which that include called .
    Thanks and Regards
    Priyank Dixit

    Hi again,
    1. I tried the same thing - include bdcrecx1
       and it only provides radiobuttons, parameters and checkboxes.
       The labels/text elements are totally empty.
    PS: Only after we GOTO--->Text Elements
         and again activate them, (by ticking the 'dictionary checkbox or entering some appropriate text);
    do they appear properly in the selection screen.
    regards,
    amit m.

  • How to add program documentation icon on selection screen

    Hi All,
    Please let me know how to add  program documentation icon on selection screen.
    Thanks
    Jog

    THis is pretty straight forward, in se38, enter program name, click change.  Now click Go To, Documentation.  Enter the documentation on this screen, save and activate, now run the program,  the icon will be there.
    REgards,
    Rich Heilman

  • When i scyn photo from pc to iphone, by using cable and selecting iphone on ituens,the photo which stored in my ipone, i am unable to delete some photoand even can not arrange them according to my wish

    when I scyn photo from pc to iphone , by using cable and selecting iphone on itunes, the photo which stored in my iphone , i am unable to delete some photo from them and even can not arrange them accoring to my wish, please let me know what to do ?

    you can only delete the photos you take on the phone itself as in from camera roll
    sync mean syncronize as in make the 2 side the same if you could delete the photos syncronized to your iphone then the nature of what syncronize mean result in the logic step being deleting the photo on your computer too
    you get rid of the photo by sync with another dir/ sourse or by moving the photo out of the dir of the computer and then resync

  • Query: how to use structure and selection and what's the difference between

    Query: how to use structure and selection and what's the difference between these two?
    Would be appreciated if some experts here give examples to demenstrate on how to use structure and selection in query and what's the difference between these two?
    Thanks in advance!

    Hi Kevin,
    1. Well by default all the KF that you include in your query go into a Key Figure Structure. You can additionally have another structure for defining how your chars are laid out. A common example is a Calmonth structure where you have selections for 12 months, quarers and YTD values. This would be a char structure with different selections (for each month, qtr etc)
    2. Yes, a selection with a KF is the same as restricting a KF. You can use am RKF is you have one on the left hand side, or if you need to do this locally in the query, right click the structure and choose New Selection, then proceed to choose your KF and reqd char values.
    Hope this helps...

  • ABAP program for BAPI and convert DB into XML

    ABAP program for BAPI and convert DB into XML
    Thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Refer the link -
    give an example of bapi coding?
    how can we transfer huge amount of data from database server to xml format
    Regards,
    Amit
    Reward all helpful replies.

  • Want program using extended_program_check and extended_program_check_show

    want program using extended_program_check and extended_program_check_show

    Type the program name in SE38 and go to the menu program->check->extenced Program Check to find the EPC errors in the program
    reward points if helpful
    Message was edited by:
            Pavan Kumar TSS

  • Value from Program to Selection screen using pushbutton on Selection Screen

    Sir,
    I am creating a Selection screen for update some fields using selection screen. I have 6 fields on screen. First 3 Fields are mendaotry for fetching the data to dispay last 3 fields. I have create a push button for fetch the last 3 fields using first 3 fields.
    So Plz guide me how to do that. I have used At Selection Screen with user command. but result is zero.
    AT SELECTION-SCREEN.
      IF sscrfields-ucomm = 'FETCH'.
          IF AGSLNO-LOw is NOT INITIAL.
              SELECT SINGLE AGATE_ENTRY_NUM BTRANSPORTER_CODE  B~TRUCK_NO
                      INTO (V_GTENT_N, V_TR_CODE, V_TRUCK_NO)
                      FROM ZGATEOUT AS A
                INNER JOIN ZGATE_IN AS B ON AGATE_ENTRY_NUM = BGATE_ENTRY_NUM
                                     AND AWERKS = BWERKS
                                     AND ATRANSPORTER_CODE = BTRANSPORTER_CODE
                INNER JOIN ZTRPTR_REQ AS C ON AWERKS = CWERKS
                                     AND ATRANSPORTER_CODE = CTRANSPORTER_CODE
                WHERE C~AGSLNO = AGSLNO-LOW.
          ENDIF.
       ENDIF.
              S_GTENT_N-low = V_GTENT_N.
              S_TR_CODE-low = V_TR_CODE.
              S_TRUCK_NO-low = V_TRUCK_NO.
    Thanks.
    Ram

    Hi.,
    did you assigned user command to push button..!!
    put a break point at  IF sscrfields-ucomm = 'FETCH'. and check whether at selection screen event is triggered or not. and check the ucomm value . 
    check this help  for reference: http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba81635c111d1829f0000e829fbfe/content.htm
    hope this helps u.,
    Thanks & regards,
    Kiran

  • Using Selection screen and selection screen output

    Hi All,
    I am trying to execute AT SELECTION-SCREEN and AT SELECTION-SCREEN output. Both the para's working fine seperately. But when I execute them together AT SELECTION-SCREEN output is not working. Please let me know how to solve this problem. Please see below for the code.
    PARAMETERS:  p_werks LIKE marc-werks OBLIGATORY MEMORY ID WRK,
                 p_lgort LIKE mard-lgort OBLIGATORY,
                 p_rlgort LIKE mard-lgort OBLIGATORY.
        PARAMETERS: p_boml TYPE c RADIOBUTTON GROUP mode user-command flag.
            SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
                PARAMETERS: p_aufnr LIKE aufk-aufnr MODIF ID cp2.
            SELECTION-SCREEN: END OF BLOCK b1.
    *SELECTION-SCREEN COMMENT 1(44) text-004 FOR FIELD p_cmpl.
        PARAMETERS: p_cmpl TYPE c RADIOBUTTON GROUP mode.
           SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
                PARAMETERS: p_matnr type marc-matnr MODIF ID cp1,
                            p_verid type afpo-verid MODIF ID cp1,
                            p_labst type mard-labst MODIF ID cp1.
           SELECTION-SCREEN: END OF BLOCK b2.
       PARAMETERS: p_mstr TYPE c RADIOBUTTON GROUP mode.
    AT SELECTION-SCREEN output.
      LOOP AT SCREEN.
        IF p_boml <> 'X' AND
           screen-group1 = 'CP1'.
           screen-active = '1'.
           MODIFY SCREEN.
        ENDIF.
        IF p_cmpl <> 'X' AND
           screen-group1 = 'CP2'.
           screen-active = '1'.
           MODIFY SCREEN.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    AT SELECTION-SCREEN.
      IF p_boml EQ 'X'.
        IF p_AUFNR EQ space.
            MESSAGE e000(z1) WITH 'Please fill Production Order.'.
        ENDIF.
      endif.
      IF p_cmpl EQ 'X'.
        IF p_MATNR EQ space  OR p_verid EQ space OR p_labst EQ space.
            MESSAGE e000(z1) WITH text-003 'Production Version & Quantity. '.
        ENDIF.
      endif.
    Thanks,
    Senthil

    Hi Senthil,
    As far as my knowledge is concerned AT Selection-Screen output and AT Selection-Screen wont work together.In this code you are trying to do the validation in AT Selection-Screen. Instead of that try doin your validations in Start-of-selection Event.
    i,e., modify your code as follows:
    PARAMETERS: p_werks LIKE marc-werks OBLIGATORY MEMORY ID WRK,
    p_lgort LIKE mard-lgort OBLIGATORY,
    p_rlgort LIKE mard-lgort OBLIGATORY.
    PARAMETERS: p_boml TYPE c RADIOBUTTON GROUP mode user-command flag.
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_aufnr LIKE aufk-aufnr MODIF ID cp2.
    SELECTION-SCREEN: END OF BLOCK b1.
    *SELECTION-SCREEN COMMENT 1(44) text-004 FOR FIELD p_cmpl.
    PARAMETERS: p_cmpl TYPE c RADIOBUTTON GROUP mode.
    SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: p_matnr type marc-matnr MODIF ID cp1,
    p_verid type afpo-verid MODIF ID cp1,
    p_labst type mard-labst MODIF ID cp1.
    SELECTION-SCREEN: END OF BLOCK b2.
    PARAMETERS: p_mstr TYPE c RADIOBUTTON GROUP mode.
    AT SELECTION-SCREEN output.
    LOOP AT SCREEN.
    IF p_boml <> 'X' AND
    screen-group1 = 'CP1'.
    screen-active = '1'.
    MODIFY SCREEN.
    ENDIF.
    IF p_cmpl <> 'X' AND
    screen-group1 = 'CP2'.
    screen-active = '1'.
    MODIFY SCREEN.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    START-OF-Selection.
    Perform validation.
    form validation.
    IF p_boml EQ 'X'.
    IF p_AUFNR EQ space.
    MESSAGE e000(z1) WITH 'Please fill Production Order.'.
    ENDIF.
    endif.
    IF p_cmpl EQ 'X'.
    IF p_MATNR EQ space OR p_verid EQ space OR p_labst EQ space.
    MESSAGE e000(z1) WITH text-003 'Production Version & Quantity. '.
    ENDIF.
    endif.
    endform.
    Kindly reward if useful.
    Thanks,
    pavithra

  • Radio button and selection screen

    hi
    my requirement is that if the user enters some particular combination of value in the select options and clicks a particular radio button there should be an error message displayed.
    1)  I am getting the error message in the form a dialog box , but it has only option of  exit , and the user is thrown of the screen. my requirement is that after the error message the user must still be at the same screen so that he can enter new values.
    2)  the code that i have written also has one more anamoly that the displaying of error depends upon the sequence of  actions .
      if  i enter the value in the select option first and then click the radio button then the error message is displayed which is correct.
    but it doesnt work i click the radio button first and then enter the value, the program is executed and NO ERROR message is flashed.
    here is what i have written
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE  text-001.
    SELECT-OPTIONS: p_year  for  s021-spmon obligatory ,
                    p_kunag  FOR vbrk-kunag  ,
                    p_matnr  FOR vbrp-matnr  ,
                    p_augru  FOR vbrp-augru_auft modif id a1 ,
                    p_vbeln  FOR vbrk-vbeln  .
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE  text-002.
    PARAMETERS:  nrw RADIOBUTTON GROUP g1 user-command check,
                 mwd RADIOBUTTON GROUP g1 ,
                 rws RADIOBUTTON GROUP g1 ,
              edu RADIOBUTTON GROUP g1 ,
             standard RADIOBUTTON GROUP g1 default 'X' .
    SELECTION-SCREEN END OF BLOCK blk2.
    SELECTION-SCREEN END OF BLOCK blk.
    at selection-screen output.
       loop at screen.
       if nrw = 'X' and p_augru-low EQ 'MWD'.
           MESSAGE e000(oo) WITH '<Please Enter the correct Order Reason>'.
    endif.
       endloop.
    START-OF-SELECTION.
    CASE 'X'.
    WHEN nrw.
    PERFORM set_dates_nrw.
          PERFORM load_data_nrw.
          PERFORM get_cust_info_nrw.
          PERFORM set_alv_field_cat_nrw.
          PERFORM display_alv_nrw.
    endcase.

    Hi
    Change this piece of code
    at selection-screen output.
    loop at screen.
    if nrw = 'X' and p_augru-low EQ 'MWD'.
    MESSAGE e000(oo) WITH '<Please Enter the correct Order Reason>'.
    endif.
    endloop.
    by
    <b>at selection-screen.
    if nrw = 'X' and p_augru-low EQ 'MWD'.
    MESSAGE e000(oo) WITH '<Please Enter the correct Order Reason>'.
    endif.</b>
    Reward points if useful.
    Regards,
    Atish

Maybe you are looking for

  • I can't reinstall Windows 7/8 via Boot Camp

    Hi all, So, I've got an SSD + HD (in optical bay) drive combination in my Mid-2012 MBP. Originally, I had successfully installed Boot Camp onto my HD using Windows 8. Ran without problems. Then, I decided to remap the partitions on it, which messed u

  • Cloning snow leopard???

    I lost my OSX 10.6 disc and just installed a new hard drive on my 20" intel iMac. Is it possible to clone my Macbook pro's OS and install it onto my iMac?

  • SharePoint 2010 - Content database contains orphaned items

    Good day people! We have come across the feared "Content databases contain orphaned items"! Running a check on our farm shows: PS C:\Users\SPAdmin> Get-SPContentDatabase | ForEach-Object { $_.repair($false)} <OrphanedObjects Count="0" /> <OrphanedObj

  • My Mac Pro 1,1 won't boot, problems with disk.

    I am having problems booting my 2006 Mac Pro 1,1. I was using my computer just fine and then I shut the computer down. When I tried to restart it the computer booted the the Apple logo and the status whell began turning, and then a progress bar appea

  • C# - Get Azure virtual machine status

    Hey, how I can get virtual machines current status using C# code? When you open Azure portal and you navigate under "Virtual Machines" you can see all your virtual machines there. You can also see virtual machines status, example "running", "stopped"