The PAI Event Code to search for a record in Table Control

Logic
1. I have a position button and entry text field (search content) for a table control in my screen. Position button has the function code 'PBUT'.
2. Content of table control will be in an internal table. The entry text field  is to be used for positioning.
3. I enter the search (key) field in text field & Click the position button.
4. The PAI event of button click (Module user_command) of that screen is as under.
Case sy_ucomm.
When 'PBUT'.
What will be the code to bring the row as selected in table control, that I have to write here, for this case-value.
Endcase.
Regards,

Hi Alok,
Excuse me, couldn`t catch u yesterday. Ok i`ve the code which will set the cursor on the selected entry.
Reward points if convinced.
*& Report  Y131_TC_TEST                                                *
REPORT  y131_tc_test NO STANDARD PAGE HEADING.
TABLES: vbak.
DATA : BEGIN OF str_tc,
       vbeln LIKE vbak-vbeln,
       erdat LIKE vbak-erdat,
       END OF str_tc,
       it_tc LIKE TABLE OF str_tc WITH HEADER LINE,
       loopc LIKE sy-loopc,
       flag,
       lin TYPE i.
CONTROLS : my_tc TYPE TABLEVIEW USING SCREEN 9000.
CALL SCREEN 9000.
*&      Module  STATUS_9000  OUTPUT
*       text
MODULE status_9000 OUTPUT.
*  SET PF-STATUS 'xxxxxxxx'.
*  SET TITLEBAR 'xxx'.
  IF it_tc[] IS INITIAL.
    SELECT vbeln erdat INTO TABLE it_tc UP TO 10
    ROWS FROM vbak.
    DESCRIBE TABLE it_tc LINES lin.
    my_tc-top_line = loopc.
  ENDIF.
ENDMODULE.                 " STATUS_9000  OUTPUT
*&      Module  USER_COMMAND_9000  INPUT
*       text
MODULE user_command_9000 INPUT.
  CASE sy-ucomm.
    WHEN 'EXIT'.
      LEAVE PROGRAM.
   <b> WHEN 'PBUT'.</b>
**** Now this event is triggerred when the user uses the ****Position Push button to locate the field value.
      CALL SCREEN 9001 STARTING AT 10 15.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_9000  INPUT
*&      Module  USER_COMMAND_9001  INPUT
*       text
MODULE user_command_9001 INPUT.
  CASE sy-ucomm.
    WHEN 'OKAY' OR ' ' or 'EXIT'.
<b>**** When the user selects values from the search help on **** position button, the itab is read and index is *****assigned</b>
      READ TABLE it_tc WITH KEY vbeln = vbak-vbeln.
      IF sy-subrc = 0.
        loopc = sy-tabix.
        flag = 'X'.
**** the cursor is set here
       <b> my_tc-top_line = loopc.</b>
         SET SCREEN 0.
      LEAVE SCREEN.
      ENDIF.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_9001  INPUT
*&      Module  STATUS_9001  OUTPUT
*       text
MODULE status_9001 OUTPUT.
  SET PF-STATUS 'MODAL'.
*  SET TITLEBAR 'xxx'.
ENDMODULE.                 " STATUS_9001  OUTPUT
Regards

Similar Messages

  • BDC for existing record in table control

    Hi,
    I have a requirement to change existing records in table control through BDC. Is there any way I can choose the respective record from Table Control through BDC dynamically.
    Regards
    Akash

    /J4I/015PER, this transaction is used for adding permits to Operation in WEC. It has list of operations in Table Control. Permit can be added for choosing the operation from table control.
    Our custom program is designed to add permits for the operation. So if I have to use the above transaction for adding permits, then first I have to choose the correct operation from the table control and then add permit.

  • How to append parameter with URL for each record in table control?

    Hi,
    I have one table control which contains 5 columns.
    (tripno, startdate, destination, reason, activities)
    In 5th column, i need to display URL for each record.
    for ex:
    www.abc.com/test?tripno=1
    www.abc.com/test?tripno=2
    www.abc.com/test?tripno=3
    when user clicks a particular hyperlink, it navigates to another page/component thru URL with one key field(tripno) to retrieve related records in next page.
    1) i am not able to assign tripno to each record. when i assign tripno, its taking the last value which i assigned. ie. tripno=3 only.
    How to assign URL to Reference field of LINK_TO_URL element at run time?
    OR
    2) we can do like this.
    Simply assign url to reach record without key field.
    www.abc.com/test
    www.abc.com/test
    www.abc.com/test
    when user clicks a particular link, we can assign corresponding key field to the URL.
    Where should i write this event? Bcoz, LINK_TO_URL doesnot have event.
    how to do?

    Hi MOg.
    Not sure whether I understand you .. but in the 5th column you want to have the reference URL. Is this the activities columen from you example?
    Nevertheless, you need a attribute (String) in your context node which contains the URL. Bind this to the reference filed of linktourl. If you can not extend the structure you can create a sub node (cardinality 1:1)  which contains the refernce attribute.
    Then loop over all elements and concatenate www.abc.com/test?tripno= with the tripno of the current element into the reference field.
    Hope tis helps,
    Sascha.
    Bind the

  • The following error occured while searching for on-premises exchange server

    I've previously posted this under the Exchange Forums - Exchange Server 2010
    I look after a company where I installed a new DELL server last year, The server is running Windows Small Business Server 2011 which we installed. Exchange 2010 was installed as part of the Windows Small Business Server 2011 installation. At the time we
    did not configure Exchange because they use external POP accounts for email. Eventually they wanted to move over to Exchange
    When we created the user accounts using Windows SBS Console, it created a local mailbox for each user
    No problems - [email protected]
    Since late last year every time I create a new user within SBS Console, it errors creating the mailbox
    Add a user account and assign a user role
    Getting "Unexpected error occurred" when Setting up an e-mail account for user
    Looking at the error "Unexpected error occurred" & MessagingManagement "Unexpected error occured"
    The user account is created ok just no e-mail address is created for the user
    I never thought much about this at the time as we weren't using Exchange email accounts. I decided to have a look at this issue over weekend
    When I try to open Microsoft Exchange Management Console I'm getting "Initialization failed"
    The following error occurred when searching for the On-Premises Exchange server
    When I try to open Microsoft Exchange Management Shell, I get a similar error
    I've download & run EMTShooter which just identifies there is an error & gives me the same error
    I've installed & re-installed WinRM IIS Extensions
    I've checked all the settings in IIS, Default Web Site, PowerShell, Modules & Paths...
    Still cannot connect to Exchange
    I've trawled through the internet for two days checking & testing every solution but no luck
    I've checked every setting against another Windows SBS 2011 Server we've installed & works
    I cannot find a difference
    Can someone help me or point me in the right direction?
    Peter Ralphs

    Thanks for the reply Larry
    I've added more detail about the error, this server is exactly how I initially installed it. This was a clean install not a migration so Exchange was a new installation. I have not applied any service packs as I did not want to confuse matters
    or compound the issue. I was wondering whether to install Server 2008 Service Pack 1 & the Exchange Service Packs. I will check the event logs & report back with what I find.
    Here's the original error I was getting when opening Exchange Management Console
    Initialization failed
    The following error ocurred while searching for the on-premises Exchange server:
    [server.myd.local] Connecting to remote server failed with the following error message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from the destination computer. The content type is absent or invalid.
    For more information, see the about_Remote_Troubleshooting Help topic. It was running the command 'Discover-ExchangeServer -UseWIA $true -SuppressError $true -CurrentVersion 'Version 14.1 (Build 218.15)
    I got similar error when trying to access the Exchange Management Shell
    VERBOSE: Connecting to SERVER.myd.local
    [server.myd.local] Connecting to remote server failed with the following error message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from the destination computer. The content type is absent or invalid.
    For more information, see the about_Remote_Troubleshooting Help topic.
        + CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [],                          
    PSRemotingTransportException
        + FullyQualifiedErrorId : PSSessionOpenFailed
    When I opened the Exchange Management Console this week, the error had changed slightly
    Initialization failed
    The following error ocurred while searching for the on-premises Exchange server:
    [server.myd.local] Connecting to remote server failed with the following error message : The WinRM client received an HTTP server error status (500), but the remote service did not include any other information about the cause of the failure. For more information,
    see the about_Remote_Troubleshooting Help topic. It was running the command 'Discover-ExchangeServer -UseWIA $true -SuppressError $true -CurrentVersion 'Version 14.1 (Build 218.15)
    I could only run Exbpa from a command prompt (obviously no access from Exchange Management Console)
    This is the result of the Health Check Scan
    Organization: First Organization
    Default Global Address List Changed
    The 'msExchQueryFilter' attribute of the default Global Address List 'Default Global Address List' has been changed. Default: '(Alias -ne $null -and (ObjectClass -eq 'user' -or ObjectClass -eq 'contact' -or ObjectClass -eq 'msExchSystemMailbox' -or ObjectClass
    -eq 'msExchDynamicDistributionList' -or ObjectClass -eq 'group' -or ObjectClass - eq 'publicFolder'))'. Current: '((Alias -ne $null) -and (((ObjectClass -eq 'user') -or (ObjectClass -eq 'contact') -or (ObjectClass -eq 'msExchSystemMailbox') -or (ObjectClass
    -eq 'msExchDynamicDistributionList') -or (ObjectClass -eq 'group') -or (ObjectClass -eq 'publicFolder'))))'.
    Admin Group: Exchange Administrative Group (FYDIBOHF23SPDLT)
    The default public folder database is remote
    The default public folder database for mailbox database 'Mailbox Database' on server SERVER isn't local. Public folder database: CN=Public Folder Database 1529293969,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First
    Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=myd,DC=local.
    Server: SERVER
    Disk timeout changed
    Disk timeout on server SERVER.myd.local is not set at the default of 10 seconds. This is normal if third-party storage software is installed. Current timeout value is 160 seconds.
    Client RPC binding found
    The 'Rpc_Binding_Order' is set on server SERVER.myd.local. It is possible that either the Exchange or Outlook client is installed on the server. Current registry value: ncalrpc,ncacn_ip_tcp.
    One thing I've noticed from the start is that the error occurs when it is "searching" for the Exchange Server, it then goes on to name the server [server.myd.local] it knows it's there but cannot access it ?
    Another thing I've noticed is that it always refers to the "remote server" this server is Windows SBS 2011, it's the Domain Controller, DHCP Server, DNS Server & Exchange Server all in the same box
    I also noticed that the Health Check stated that "The default public folder database is remote"
    Has this something to do with it ?
    Regards
    Peter

  • I have problem with my wifi in 4 S, i cant connect to any wifi itried resetting network setting and reset all setting but the result was the same, its only keeps searching for wifi and cant find any, itried to use OTHER but also didnt work.please help me

    i have problem with my wifi in 4 S, i cant connect to any wifi itried resetting network setting and reset all setting but the result was the same, its only keeps searching for wifi and cant find any, itried to use OTHER but also didnt work.please help me???

    If Join was on then your home wi-fi must be set to Non-Broadcast.  If you did not set this up (maybe your provider did) then you will need to find the Network Name they used, and any password they used.  The SSID is Security Set ID and to see more try http://en.wikipedia.org/wiki/SSID .  Basically it is the name used to identify your router/network.  A lot of times the installer will leave it set as LinkSys, or Broadcom or whatever the manufacturer set it as for default.  Your best bet is to get whoever installed it to walk you through how they set it up, giving you id's and passwords so you can get in.  HOWEVER, if you are not comfortable with this (if you set security wrong, etc.) you would be well ahead of the game to hire a local computer tech (networking) to get this working for you.  You can also contact the vendor of your router and get help (if it is still in warranty), or at least get copies of the manuals as pdf files.  Sorry I can't give you more help, I hope this gives you an idea where to go from here to find more.

  • The following error occured when searching for on-premises exchange server

    I look after a company where I installed a new DELL server last year, The server is running Windows Small Business Server 2011 which we installed. Exchange 2010 was installed as part of the Windows Small Business Server 2011 installation. At the time we
    did not configure Exchange because they use external POP accounts for email. Eventually they wanted to move over to Exchange
    When we created the user accounts using Windows SBS Console, it created a local mailbox for each user
    No problems - [email protected]
    Since late last year every time I create a new user within SBS Console, it errors creating the mailbox
    Add a user account and assign a user role
    Getting "Unexpected error occurred" when Setting up an e-mail account for user
    Looking at the error "Unexpected error occurred" & MessagingManagement "Unexpected error occured"
    The user account is created ok just no e-mail address is created for the user
    I never thought much about this at the time as we weren't using Exchange email accounts. I decided to have a look at this issue over weekend
    When I try to open Microsoft Exchange Management Console I'm getting "Initialization failed"
    The following error occurred when searching for the On-Premises Exchange server
    When I try to open Microsoft Exchange Management Shell, I get a similar error
    I've download & run EMTShooter which just identifies there is an error & gives me the same error
    I've installed & re-installed WinRM IIS Extensions
    I've checked all the settings in IIS, Default Web Site, PowerShell, Modules & Paths...
    Still cannot connect to Exchange
    I've trawled through the internet for two days checking & testing every solution but no luck
    I've checked every setting against another Windows SBS 2011 Server we've installed & works
    I cannot find a difference
    Can someone help me or point me in the right direction?
    Peter Ralphs

    Thanks for the reply Cara
    Here's the original error I was getting when opening Exchange Management Console
    Initialization failed
    The following error ocurred while searching for the on-premises Exchange server:
    [server.myd.local] Connecting to remote server failed with the following error message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from the destination computer. The content type is absent or invalid.
    For more information, see the about_Remote_Troubleshooting Help topic. It was running the command 'Discover-ExchangeServer -UseWIA $true -SuppressError $true -CurrentVersion 'Version 14.1 (Build 218.15)
    I got similar error when trying to access the Exchange Management Shell
    VERBOSE: Connecting to SERVER.myd.local
    [server.myd.local] Connecting to remote server failed with the following error message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from the destination computer. The content type is absent or invalid.
    For more information, see the about_Remote_Troubleshooting Help topic.
        + CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [],                          
    PSRemotingTransportException
        + FullyQualifiedErrorId : PSSessionOpenFailed
    When I opened the Exchange Management Console this week, the error had changed slightly
    Initialization failed
    The following error ocurred while searching for the on-premises Exchange server:
    [server.myd.local] Connecting to remote server failed with the following error message : The WinRM client received an HTTP server error status (500), but the remote service did not include any other information about the cause of the failure. For more information,
    see the about_Remote_Troubleshooting Help topic. It was running the command 'Discover-ExchangeServer -UseWIA $true -SuppressError $true -CurrentVersion 'Version 14.1 (Build 218.15)
    I could only run Exbpa from a command prompt (obviously no access from Exchange Management Console)
    This is the result of the Health Check Scan
    Organization: First Organization
    Default Global Address List Changed
    The 'msExchQueryFilter' attribute of the default Global Address List 'Default Global Address List' has been changed. Default: '(Alias -ne $null -and (ObjectClass -eq 'user' -or ObjectClass -eq 'contact' -or ObjectClass -eq 'msExchSystemMailbox' -or ObjectClass
    -eq 'msExchDynamicDistributionList' -or ObjectClass -eq 'group' -or ObjectClass - eq 'publicFolder'))'. Current: '((Alias -ne $null) -and (((ObjectClass -eq 'user') -or (ObjectClass -eq 'contact') -or (ObjectClass -eq 'msExchSystemMailbox') -or (ObjectClass
    -eq 'msExchDynamicDistributionList') -or (ObjectClass -eq 'group') -or (ObjectClass -eq 'publicFolder'))))'.
    Admin Group: Exchange Administrative Group (FYDIBOHF23SPDLT)
    The default public folder database is remote
    The default public folder database for mailbox database 'Mailbox Database' on server SERVER isn't local. Public folder database: CN=Public Folder Database 1529293969,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First
    Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=myd,DC=local.
    Server: SERVER
    Disk timeout changed
    Disk timeout on server SERVER.myd.local is not set at the default of 10 seconds. This is normal if third-party storage software is installed. Current timeout value is 160 seconds.
    Client RPC binding found
    The 'Rpc_Binding_Order' is set on server SERVER.myd.local. It is possible that either the Exchange or Outlook client is installed on the server. Current registry value: ncalrpc,ncacn_ip_tcp.
    One thing I've noticed from the start is that the error occurs when it is "searching" for the Exchange Server, it then goes on to name the server [server.myd.local] it knows it's there but cannot access it ?
    Another thing I've noticed is that it always refers to the "remote server" this server is Windows SBS 2011, it's the Domain Controller, DHCP Server, DNS Server & Exchange Server all in the same box
    I also noticed that the Health Check stated that "The default public folder database is remote"
    Has this something to do with it ?
    Regards
    Peter

  • I have iphone 6 with ios 8.1.1. The bluetooth pairs with my sony car radio and everything works fine. However, the iphone won't stop searching for other devices.

    I have an iPhone 6 with ios 8.1.1 operating system. The Bluetooth pairs with my Sony car radio and works fine. However, the iPhone will not stop searching for other devices. This does not seem to affect anything, but I can't help but think it is using battery power.

    One possibility: 
    How do you know it is searching for other devices?  Because you opened Settings > Bluetooth?
    Why is it searching for other devices? Because you opened Settings > Bluetooth? 

  • Iphone 5 I do not go out or do not appear in upgrede AirPlay for ios 7.0.4 safari browser is not smooth and too long kept out the phrase "safari can not search for too many repetitions search"

    iphone 5 I do not go out or do not appear in upgrede AirPlay for ios 7.0.4 safari browser is not smooth and too long kept out the phrase "safari can not search for too many repetitions search"

    AphexTwin wrote:
    - no Apple input?
    Of course not.  Didn't you bother to read the TOU of this forum?  This is a USER TO USER technical support forum.  Apple doesn't post here.

  • I cannot access Content Library in iMovie - Content Library doesn't show on the iMovie screen and is greyed out when accessed through "windows" tab at the top. Also unable to update the projects/events (a suggested solution for a similar question).

    I cannot access Content Library in iMovie - Content Library doesn't show on the iMovie screen and is greyed out when accessed through "windows" tab at the top. Also unable to update the projects/events (a suggested solution for a similar question). I haven't had this issue before, I have always used the content library on the screen but haven't used this for about a month. How can I make the Content Library available?

    Thanks so much! I am backing up the entire computer now with an external hard drive - this should be fine right? And surely if I am backing up the whole computer these projects/videos will be backed up too? I wasn't sure how to do this any other way and I am clearly not great with tech issues. Once this is done and I am sure my projects/videos are safe I will do the delete and reinstall bit. Thanks for taking the time to help

  • Bought 4th Gen 3TB TC - streaming TV over the internet is now so slow and now is constantly buffering.  It seems the Airport Utility is always 'searching for new networks' - don't know if this is the problem.  It's not the internet speed as checked that.

    Bought 4th Gen 3TB TC - streaming TV over the internet is now so slow and now is constantly buffering.  It seems the Airport Utility is always 'searching for new networks' - don't know if this is the problem.  It's not the internet speed as checked that.  I took my old router upstairs and was streaming TV via my ipad seamlessly - the same program via the TC was constantly buffering.
    I just expected to be able to plug in the TC, so a simple set-up and experience wireless both upstairs and downstairs in my house.  For some reason the range is low and speed veru disappointing.
    I am far from being an IT expert but I would welcome advice about setting up this TC so we can enjoy the product as it was designed.  Please HELP!

    No silver bullet........but my suggestions may drive you in the right direction.
    1.  Unplug the power cable from the TC and wait 10-15 minutes before powering back up.   Seriously wait!
          Proceed to #2 if this dosen't help.
    2.  Unplug the power cable from the TC, ubplug the power cable from your Broadband Modem (assuming it's a cable modem), disconnect ethernet, and cable from modem. 
    2a.  Wait 10-15 minutes then re-connect cable, ethernet, and power back to modem (your modem should power up unless you have a power switch)  wait for all the modem lights to come on EXCEPT activity.
    2b.  Connect ethernet from modem to TC, and plug in the power cable to TC.
          Proceed to #3 if this dosen't help.
    3.  Reconfigure the TC.........Read here........http://support.apple.com/kb/HT3728
    All really simple to do....if you need additional help let me (us) know.

  • I installed LR CC , but when i try launching it flashes & it is gone. I tried the solution in the Adobe Site - which says search for the folder Library/Application Support/ Adobe/ Sl Store ...., but i can't seem to find the SL Store or SLCache folders ( i

    I installed LR CC , but when i try launching it flashes & it is gone. I tried the solution in the Adobe Site - which says search for the folder Library/Application Support/ Adobe/ Sl Store ...., but i can't seem to find the SL Store or SLCache folders ( i use the Mac). Only then can i apply the solution. I just cant seem to find the folder in the first place

    That did not work for me & as per adobe site help if signing out does not help- we are supposed to go the above folders & do some additional steps, but i could not find the folders & hence the question

  • Since I recently installed pages on my iPad when I try to edit a file on my mac it requires me to update the programme however when I search for updates none seem to be available.

    Since I recently installed pages on my iPad when I try to edit a file on my mac it requires me to update the programme however when I search for updates none seem to be available.

    What version are you using?
    The latest version of Pages('09) is 4.3
    http://support.apple.com/kb/DL1563

  • I have Mail with 5 accounts. The problem is that one of them is constantly active, that is with the moving wheel showing a search for new mails.

    I have Mail with 5 accounts. The problem is that one of them is constantly active, that is, with the moving wheel showing a search for new mails, while the others accounts are not active.

    hello
    Would not take the moving wheel as indication that account is active. There could be other reasons for it. From the menu Window, choose 'connection doctor' that will show you how each account has connected. Next, from the Window menu choose 'activity veiwer' that will show you exactly what activity is causing the moving wheel.

  • Search help for a field in table control based on another field value

    Hi,
    I want to attach the Search help for a field in table control based on another field value.
    Please help me asap.
    Will be highly rewarded

    HI,..
      Check these links
    search help in table control
    Re: How to create Search Help for a field in Table control !!
    How to create Search Help for a field in Table control !!
    F4 Help In Table Control
    Control table F4 help
    Problem in F4 help in screen field
    check this code
    DATA: BEGIN OF it_value4 OCCURS 0,
             TEXTCODE  LIKE  ZXX-TEXTCODE,
             TEXTDESC  LIKE  ZXX-TEXTDESC,
           END OF it_value4.
      progname = sy-repid.
      dynnum   = sy-dynnr.
             SELECT TEXTCODE TEXTDESC
               FROM  xxxx
               INTO CORRESPONDING FIELDS OF TABLE<b> it_value4</b>
              WHERE  LOSS_CODE =<b> IT_VALUE1 .</b>
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'TEXTCODE'
          dynpprog    = progname
          dynpnr      = dynnum
          dynprofield = 'ITVALUE-TEXTCODE'  "-->UR  4 th filed value in screen
          value_org   = 'S'
        TABLES
          value_tab   = it_value4.
    endmodule.
    Message was edited by:
            veereshbabu ponnada

  • How to create Search Help for a field in Table control !!

    Hello Friends,
                  I like to know - How to create Search Help for a field in Table control. Is it possible, if it is please share ur knowledge, I wud be happy if U provide some source code example for this.
    Thanks,
    Senthil

    Check the sample code:
    *&  Include           ZSRO_MPRN_SEARCH                                 *
    MODULE PSTLZ_F4 INPUT
    MODULE pstlz_f4 INPUT.
    reading post code
      DATA: stepl TYPE systepl,
            stepl_index TYPE systepl.
      CLEAR: stepl, stepl_index.
      CLEAR:   lt_returntab,lt_dynpfields,i_mprn1.
      REFRESH: lt_returntab,lt_dynpfields,i_mprn1.
      lt_dynpfields-fieldname = 'I_MPRN-POST_CODE'.
      lt_dynpfields-stepl     = stepl.
      APPEND lt_dynpfields. CLEAR lt_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = c_x
          determine_loop_index = c_x
        TABLES
          dynpfields           = lt_dynpfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc EQ 0.
        READ TABLE lt_dynpfields INDEX 1.
      ENDIF.
      ws_outcode  = lt_dynpfields-fieldvalue.
      stepl_index = lt_dynpfields-stepl.
      REPLACE '*' WITH ' ' INTO lt_dynpfields-fieldvalue.
      IF NOT lt_dynpfields-fieldvalue IS INITIAL.
        MOVE lt_dynpfields-fieldvalue TO ws_outcode.
        ws_len = STRLEN( lt_dynpfields-fieldvalue ).
        IF ws_len GE 7.
          ws_len = ws_len - 3.
         ws_icode = ws_code+ws_len(3).
          lt_dynpfields-fieldvalue = lt_dynpfields-fieldvalue+0(ws_len).
          CONCATENATE lt_dynpfields-fieldvalue '%'
              INTO ws_outcode.
          CONDENSE lt_dynpfields-fieldvalue.
       REPLACE ws_icode WITH ' ' INTO lt_dynpfields-fieldvalue.
        ELSE.
          CONCATENATE lt_dynpfields-fieldvalue+0(4) '%'
            INTO ws_outcode.
        ENDIF.
       ws_ocode = ws_code+0(3).
      ENDIF.
    reading MPRN
      CLEAR:   lt_returntab,lt_dnpfields,i_mprn1.
      REFRESH: lt_returntab,lt_dnpfields,i_mprn1.
      lt_dnpfields-fieldname = 'I_MPRN-MPRN'.
      lt_dnpfields-stepl     = stepl_index.
      APPEND lt_dnpfields. CLEAR lt_dnpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
        TABLES
          dynpfields           = lt_dnpfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc EQ 0.
        READ TABLE lt_dnpfields INDEX 1.
      ENDIF.
    MPRN blank and Post code exist
      IF lt_dnpfields-fieldvalue IS INITIAL.
        IF NOT lt_dynpfields-fieldvalue IS INITIAL.
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE outcode LIKE ws_outcode.
        ELSE.
    MPRN blank and Post code blank
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1.
        ENDIF.
      ELSE.
    MPRN exist and Post code exist
        IF NOT lt_dynpfields-fieldvalue IS INITIAL.
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE outcode LIKE ws_outcode AND
                       mprn EQ lt_dnpfields-fieldvalue.
        ELSE.
    MPRN exist and Post code blank
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE mprn EQ lt_dnpfields-fieldvalue.
        ENDIF.
      ENDIF.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'MPRN'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          window_title    = 'Select MPRN'
          value_org       = 'S'
        TABLES
          value_tab       = i_mprn1 "lt_mprn
          return_tab      = lt_returntab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc EQ 0.
        READ TABLE lt_returntab INDEX 1.
        READ TABLE i_mprn1 WITH KEY mprn = lt_returntab-fieldval.
        IF sy-subrc EQ 0.
    Updating post code
          CONCATENATE i_mprn1-outcode  i_mprn1-incode
                        INTO ws_postcode
                             SEPARATED BY space.
          MOVE ws_postcode TO i_mprn-post_code.
          CLEAR   : i_dnpfld,
                    ws_dynpfld.
          REFRESH : i_dnpfld.
          ws_dyname   = 'ZSRO_MASTER_DATA'.
          ws_dynumb   = '0301'.
          ws_dynpfld-fieldname  ='I_MPRN-POST_CODE'.
          ws_dynpfld-fieldvalue = ws_postcode .
          ws_dynpfld-stepl      = stepl_index.
          APPEND ws_dynpfld TO i_dnpfld.
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname               = ws_dyname
              dynumb               = ws_dynumb
            TABLES
              dynpfields           = i_dnpfld
            EXCEPTIONS
              invalid_abapworkarea = 1
              invalid_dynprofield  = 2
              invalid_dynproname   = 3
              invalid_dynpronummer = 4
              invalid_request      = 5
              no_fielddescription  = 6
              undefind_error       = 7
              OTHERS               = 8.
          IF sy-subrc <> 0.
          ENDIF.
    Updating MPRN
          MOVE i_mprn1-mprn TO i_mprn-mprn.
          CLEAR   : i_dnpfld,
                    ws_dynpfld.
          REFRESH : i_dnpfld.
          ws_dyname   = 'ZSRO_MASTER_DATA'.
          ws_dynumb   = '0301'.
          ws_dynpfld-fieldname  ='I_MPRN-MPRN'.
          ws_dynpfld-fieldvalue = i_mprn1-mprn .
          ws_dynpfld-stepl      = stepl_index.
          APPEND ws_dynpfld TO i_dnpfld.
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname               = ws_dyname
              dynumb               = ws_dynumb
            TABLES
              dynpfields           = i_dnpfld
            EXCEPTIONS
              invalid_abapworkarea = 1
              invalid_dynprofield  = 2
              invalid_dynproname   = 3
              invalid_dynpronummer = 4
              invalid_request      = 5
              no_fielddescription  = 6
              undefind_error       = 7
              OTHERS               = 8.
          IF sy-subrc <> 0.
          ENDIF.
        ENDIF.
      ELSEIF sy-subrc EQ 2.
        MESSAGE s005(zspa) WITH ws_postcode .
      ENDIF.
    ENDMODULE.                    "PSTLZ_F4 INPUT
    MODULE MPRN_F4 INPUT
    MODULE mprn_f4 INPUT.
    reading post code
    DATA: stepl TYPE systepl,
           stepl_index TYPE systepl.
      CLEAR: stepl, stepl_index.
      CLEAR:   lt_returntab,lt_dynpfields,i_mprn1.
      REFRESH: lt_returntab,lt_dynpfields,i_mprn1.
      lt_dynpfields-fieldname = 'I_MPRN-POST_CODE'.
      lt_dynpfields-stepl     = stepl.
      APPEND lt_dynpfields. CLEAR lt_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = c_x
          determine_loop_index = c_x
        TABLES
          dynpfields           = lt_dynpfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc EQ 0.
        READ TABLE lt_dynpfields INDEX 1.
      ENDIF.
      ws_outcode = lt_dynpfields-fieldvalue.
      stepl_index = lt_dynpfields-stepl.
      REPLACE '*' WITH ' ' INTO lt_dynpfields-fieldvalue.
      IF NOT lt_dynpfields-fieldvalue IS INITIAL.
        MOVE lt_dynpfields-fieldvalue TO ws_outcode.
        ws_len = STRLEN( lt_dynpfields-fieldvalue ).
        IF ws_len GE 7.
          ws_len = ws_len - 3.
         ws_icode = ws_code+ws_len(3).
          lt_dynpfields-fieldvalue = lt_dynpfields-fieldvalue+0(ws_len).
          CONCATENATE lt_dynpfields-fieldvalue '%'
              INTO ws_outcode.
          CONDENSE lt_dynpfields-fieldvalue.
       REPLACE ws_icode WITH ' ' INTO lt_dynpfields-fieldvalue.
        ELSE.
          CONCATENATE lt_dynpfields-fieldvalue+0(4) '%'
            INTO ws_outcode.
        ENDIF.
       ws_ocode = ws_code+0(3).
      ENDIF.
    reading MPRN
      CLEAR:   lt_returntab,lt_dnpfields,i_mprn1.
      REFRESH: lt_returntab,lt_dnpfields,i_mprn1.
      lt_dnpfields-fieldname = 'I_MPRN-MPRN'.
      lt_dnpfields-stepl     = stepl_index.
      APPEND lt_dnpfields. CLEAR lt_dnpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
        TABLES
          dynpfields           = lt_dnpfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc EQ 0.
        READ TABLE lt_dnpfields INDEX 1.
      ENDIF.
    MPRN blank and Post code exist
      IF lt_dnpfields-fieldvalue IS INITIAL.
        IF NOT lt_dynpfields-fieldvalue IS INITIAL.
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE outcode LIKE ws_outcode.
        ELSE.
    MPRN blank and Post code blank
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1.
        ENDIF.
      ELSE.
    MPRN exist and Post code exist
        IF NOT lt_dynpfields-fieldvalue IS INITIAL.
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE outcode LIKE ws_outcode AND
                       mprn EQ lt_dnpfields-fieldvalue.
        ELSE.
    MPRN exist and Post code blank
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE mprn EQ lt_dnpfields-fieldvalue.
        ENDIF.
      ENDIF.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'MPRN'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          window_title    = 'Select MPRN'
          value_org       = 'S'
        TABLES
          value_tab       = i_mprn1 "lt_mprn
          return_tab      = lt_returntab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc EQ 0.
        READ TABLE lt_returntab INDEX 1.
        READ TABLE i_mprn1 WITH KEY mprn = lt_returntab-fieldval.
        IF sy-subrc EQ 0.
    Updating MPRN
          MOVE i_mprn1-mprn TO i_mprn-mprn.
          CLEAR   : i_dnpfld,
                    ws_dynpfld.
          REFRESH : i_dnpfld.
          ws_dyname   = 'ZSRO_MASTER_DATA'.
          ws_dynumb   = '0301'.
          ws_dynpfld-fieldname  ='I_MPRN-MPRN'.
          ws_dynpfld-fieldvalue = i_mprn1-mprn .
          ws_dynpfld-stepl      = stepl_index.
          APPEND ws_dynpfld TO i_dnpfld.
    **code changed by laxman 10.08.2005
         ws_dynpfld-stepl  = mprn-current_line.
    **code changed by laxman 10.08.2005
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname               = ws_dyname
              dynumb               = ws_dynumb
            TABLES
              dynpfields           = i_dnpfld
            EXCEPTIONS
              invalid_abapworkarea = 1
              invalid_dynprofield  = 2
              invalid_dynproname   = 3
              invalid_dynpronummer = 4
              invalid_request      = 5
              no_fielddescription  = 6
              undefind_error       = 7
              OTHERS               = 8.
          IF sy-subrc <> 0.
          ENDIF.
    Updating post code
          CONCATENATE i_mprn1-outcode  i_mprn1-incode
                        INTO ws_postcode
                             SEPARATED BY space.
          MOVE ws_postcode TO i_mprn-post_code.
          CLEAR   : i_dnpfld,
                    ws_dynpfld.
          REFRESH : i_dnpfld.
          ws_dyname   = 'ZSRO_MASTER_DATA'.
          ws_dynumb   = '0301'.
          ws_dynpfld-fieldname  ='I_MPRN-POST_CODE'.
          ws_dynpfld-fieldvalue = ws_postcode .
          ws_dynpfld-stepl      = stepl_index.
          APPEND ws_dynpfld TO i_dnpfld.
    **code changed by laxman 10.08.2005
         break gblap0.
         ws_dynpfld-stepl  = mprn-current_line.
         LOOP AT i_mprn.
           MOVE i_mprn1-mprn TO i_mprn-mprn.
           MOVE ws_postcode TO i_mprn-post_code.
           MODIFY i_mprn INDEX
                    mprn-current_line." transporting MPRN POST_CODE.
         ENDLOOP.
    **code changed by laxman 10.08.2005
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname               = ws_dyname
              dynumb               = ws_dynumb
            TABLES
              dynpfields           = i_dnpfld
            EXCEPTIONS
              invalid_abapworkarea = 1
              invalid_dynprofield  = 2
              invalid_dynproname   = 3
              invalid_dynpronummer = 4
              invalid_request      = 5
              no_fielddescription  = 6
              undefind_error       = 7
              OTHERS               = 8.
          IF sy-subrc <> 0.
          ENDIF.
        ENDIF.
      ELSEIF sy-subrc EQ 2.
        MESSAGE s006(zspa) WITH i_mprn1-mprn .
      ENDIF.
    ENDMODULE.                    "MPRN_F4 INPUT
    MODULE GNTC_F4 INPUT
    MODULE gntc_f4 INPUT.
      DATA: BEGIN OF lt_gntc OCCURS 0,
              gntc LIKE iflot-zzgntc,
            END OF lt_gntc.
      CLEAR:   lt_returntab, lt_gntc.
      REFRESH: lt_returntab, lt_gntc.
      lt_gntc-gntc = 'DM'.
      APPEND lt_gntc. CLEAR lt_gntc.
      lt_gntc-gntc = 'NDM'.
      APPEND lt_gntc. CLEAR lt_gntc.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ZZGNTC'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          window_title    = 'Select Gas Nomination Type Code'
          value_org       = 'S'
        TABLES
          value_tab       = lt_gntc
          return_tab      = lt_returntab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc EQ 0.
        READ TABLE lt_returntab INDEX 1.
        i_mprn-dm_ndm = lt_returntab-fieldval.
      ENDIF.
    ENDMODULE.                    "GNTC_F4 INPUT
    *&      Module  mprn1_f4  INPUT
          text
    MODULE mprn1_f4 INPUT.
      DATA: lt_f4          TYPE ddshretval OCCURS 0 WITH HEADER LINE,
            lt_returntab1  LIKE ddshretval OCCURS 0 WITH HEADER LINE,
            lt_dynpfields1 LIKE dynpread OCCURS 0 WITH HEADER LINE,
            lt_dnpfields1  LIKE dynpread OCCURS 0 WITH HEADER LINE.
      DATA: stepl1 TYPE systepl,
            stepl_index1 TYPE systepl.
      DATA : i_dnpfld1      LIKE dynpread OCCURS 0 WITH HEADER LINE,
             ws_dyname1     LIKE d020s-prog,
             ws_dynumb1     LIKE d020s-dnum,
             ws_dynpfld1    LIKE dynpread.
      CLEAR: i_dnpfld1,  ws_dyname1, ws_dynumb1, ws_dynpfld1,
             lt_f4, lt_returntab1,lt_dynpfields1, lt_f4,
             stepl1, stepl_index1.
      REFRESH: i_dnpfld1, lt_returntab1,lt_dynpfields1, lt_f4.
    To Determine Steploop Index
      lt_dynpfields1-fieldname = 'I_MPRN-POST_CODE'.
      lt_dynpfields1-stepl     = stepl1.
      APPEND lt_dynpfields1. CLEAR lt_dynpfields1.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
          determine_loop_index = 'X'
        TABLES
          dynpfields           = lt_dynpfields1
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc EQ 0.
        READ TABLE lt_dynpfields1 INDEX 1.
      ENDIF.
      stepl_index1 = lt_dynpfields1-stepl.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname           = 'IFLOT'
          fieldname         = 'I_MPRN-MPRN'
          searchhelp        = 'ZS_MPRN_PC'
          dynpprog          = sy-repid
          dynpnr            = sy-dynnr
        TABLES
          return_tab        = lt_f4
        EXCEPTIONS
          field_not_found   = 1
          no_help_for_field = 2
          inconsistent_help = 3
          no_values_found   = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Update tablecontrol
      READ TABLE lt_f4 WITH KEY fieldname = 'MPRN'.
      IF sy-subrc = 0.
        MOVE lt_f4-fieldval TO i_mprn-mprn.
        ws_dyname1   = 'ZSRO_MASTER_DATA'.
        ws_dynumb1   = '0301'.
        ws_dynpfld1-fieldname  ='I_MPRN-MPRN'.
        ws_dynpfld1-fieldvalue = i_mprn-mprn.
        ws_dynpfld1-stepl      = stepl_index1.
        APPEND ws_dynpfld1 TO i_dnpfld1.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = ws_dyname1
            dynumb               = ws_dynumb1
          TABLES
            dynpfields           = i_dnpfld1
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
      CLEAR  : i_dnpfld1, ws_dynpfld1.
      REFRESH: i_dnpfld1.
      READ TABLE lt_f4 WITH KEY fieldname = 'ZZPSTLZ'.
      IF sy-subrc = 0.
        MOVE lt_f4-fieldval TO i_mprn-post_code.
        ws_dyname1   = 'ZSRO_MASTER_DATA'.
        ws_dynumb1   = '0301'.
        ws_dynpfld1-fieldname  ='I_MPRN-POST_CODE'.
        ws_dynpfld1-fieldvalue = i_mprn-post_code.
        ws_dynpfld1-stepl      = stepl_index1.
        APPEND ws_dynpfld1 TO i_dnpfld1.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = ws_dyname1
            dynumb               = ws_dynumb1
          TABLES
            dynpfields           = i_dnpfld1
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " mprn1_f4  INPUT
    *&      Module  pstlz1_f4  INPUT
          text
    MODULE pstlz1_f4 INPUT.
      CLEAR: i_dnpfld1,  ws_dyname1, ws_dynumb1, ws_dynpfld1,
              lt_f4, lt_returntab1,lt_dynpfields1, lt_f4,
              stepl1, stepl_index1.
      REFRESH: i_dnpfld1, lt_returntab1,lt_dynpfields1, lt_f4.
    To Determine Steploop Index
      lt_dynpfields1-fieldname = 'I_MPRN-MPRN'.
      lt_dynpfields1-stepl     = stepl1.
      APPEND lt_dynpfields1. CLEAR lt_dynpfields1.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
          determine_loop_index = 'X'
        TABLES
          dynpfields           = lt_dynpfields1
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc EQ 0.
        READ TABLE lt_dynpfields1 INDEX 1.
      ENDIF.
      stepl_index1 = lt_dynpfields1-stepl.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname           = 'IFLOT'
          fieldname         = 'I_MPRN-POST_CODE'
          searchhelp        = 'ZS_MPRN_PC'
          dynpprog          = sy-repid
          dynpnr            = sy-dynnr
        TABLES
          return_tab        = lt_f4
        EXCEPTIONS
          field_not_found   = 1
          no_help_for_field = 2
          inconsistent_help = 3
          no_values_found   = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Update tablecontrol
      READ TABLE lt_f4 WITH KEY fieldname = 'ZZPSTLZ'.
      IF sy-subrc = 0.
        MOVE lt_f4-fieldval TO i_mprn-post_code.
        ws_dyname1   = 'ZSRO_MASTER_DATA'.
        ws_dynumb1   = '0301'.
        ws_dynpfld1-fieldname  ='I_MPRN-POST_CODE'.
        ws_dynpfld1-fieldvalue = i_mprn-post_code.
        ws_dynpfld1-stepl      = stepl_index1.
        APPEND ws_dynpfld1 TO i_dnpfld1.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = ws_dyname1
            dynumb               = ws_dynumb1
          TABLES
            dynpfields           = i_dnpfld1
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
      CLEAR  : i_dnpfld1, ws_dynpfld1.
      REFRESH: i_dnpfld1.
      READ TABLE lt_f4 WITH KEY fieldname = 'MPRN'.
      IF sy-subrc = 0.
        MOVE lt_f4-fieldval TO i_mprn-mprn.
        ws_dyname1   = 'ZSRO_MASTER_DATA'.
        ws_dynumb1   = '0301'.
        ws_dynpfld1-fieldname  ='I_MPRN-MPRN'.
        ws_dynpfld1-fieldvalue = i_mprn-mprn.
        ws_dynpfld1-stepl      = stepl_index1.
        APPEND ws_dynpfld1 TO i_dnpfld1.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = ws_dyname1
            dynumb               = ws_dynumb1
          TABLES
            dynpfields           = i_dnpfld1
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " pstlz1_f4  INPUT
    Regards,
    Prakash.

Maybe you are looking for

  • Facebook messenger won't start anymore.

    Facebook messenger won't start anymore on my iPad Air (iOS 8.1.3) after updating de Facebook App (v 23.0) on January 30. The blue circle keeps turning. What can I do?

  • Photoshop CS5 quits!

    PS cs5 seems to just quit when you are either working in it or if its sitting idle? Very annoying when you loose what you're working on. Is this a sortware and hardware issue?

  • I cannot save pdf.  I'm using Windows 7

    I recently purchased a new computer running Windows 7.  Every time I try to save a pdf document, nothing happens.  I click on the save icon on the bottom floating display but it does not respond when being clicked on.

  • [Solved] Ath9k kernel panic

    I get random kernel panics when the wicd daemon is running. Nothing is logged in either the kernel log or the wicd log. My ipv6 mod is disabled. I got a 64 bit system and an Atheros AR9285 wireless. I dont know if matters but I have an nvidia card wi

  • SSID/VLANs for Guest/Staff with 3600 and 2504 Controller

    We are deploying 3600 AP's with a 2504 and would like to create multiple SSID's that are mapped to unique VLANs so we can control the traffic at the Firewall.  We have the 2504 up and running with AP's but there appears to be no where in the 2504 con