Web Dynpro. Part III. To a limited extent II, we made one information field, a button and one line of result. Here, we would make more than one info fields, a button and a table with various lines as result.
Web Dynpro. Part III. Lets expect your practical detail records says; We really want an entry application which would report the quantity of orders made by specific clients in a given date outline. Archive name, Record type, creation date and client who made ought to be accounted for. Complex . Web Dynpro. Part III. As such, make one information field for Client Id, one territory for Date field and show VBAK-VBELN, VBAK-AUART, VBAK-ERDAT and VBAK-ERNAM.. Simple ..
Lets plan our design as we did in Part II.
1) Make WD Part in SE80.
2) In this activity, we won’t make setting in the part regulator, yet we will make in View Regulator and use it locally.
3) Characterize the information screen setting (one line structure type) and result setting (table sort).
4) Plan the format and Tie your feedback fields and result fields.
5) In the execute button, make an Activity and in the naturally made strategy, create the code to peruse input fields, select information and show yield fields.
Lets start.. Web Dynpro. Part III
Step 1: Create your component in SE80. Go to View Context and define the selection screen context (CN_SEL_SCREEN). Three attributes/fields i.e. userid, from date and to date are defined. Similarly define output table context (CN_RESULT). As per requirement, four fields / attributes i.e. sales order, created date, createdy by and document type are defined.
Stage 2: Go to View Format and make input fields. Bunch them in straightforward holder. Remember to make Marks and adjust them. Make sure to label one mark with one information field in the LabelFor property of Name.
Your From Date and To Date probably won’t be in one line.. .. Simply change the Design type to Network Format, both would be in one line.. cheerful..
Did you tie the info fields to the specific circumstance? At this point, you ought to know that, setting is your workspace or variable or interior table. The UI component with which you tag/tie it, that setting would hold your information.. Freeze it..
Stage 3: Restless to perceive how your screen seems to be. Make an application for your part (right snap and made), give a name and portrayal and save it. Presently right snap the application and test or hit F8 to test your screen.
Congrats!! it does show up.
Tip: Kindly keep your feedback fields in various straightforward compartments. Check, we have various holders for various UI components. You probably won’t envision its significance in straightforward turns of events. However, for complex one with bunches of UI components, these straightforward compartment would help in simple gathering and control.
Stage 4: Make one more straightforward holder and pur TABLE UI component in it. This sounds our last inside table, really. Tie it to the CN_RESULT setting which we have previously characterized.
Still your table shows: Table doesn’t contain noticeable sections.. What’s the significance here?
You have another move toward accomplish for Tables. In spite of the fact that you have bound the datasource with CN_RESULT, you actually need to make a limiting and characterize how it ought to seem to be.
Right snap on the Table UI component – > Make Restricting and characterize the Cell editior for the table segments. We have shown it as text field. You can show it as button or info fields and so forth according to your necessity.
Enchantment.. your sections are noticeable at this point..
Stage 5: Uh oh, we neglected to add the Execute button.
Make the button component and connection onAction. Say your activity name is Execute, check ONACTIONEXECUTE strategy is made.
Stage 6: The main advances. We really want to peruse screen input information, get information from data set and show back in the screen.
* 1 Read value in the USERID Context entered in the screen
* 2 Read value in the From Date and Two Date Context entered in the screen
* 3 Select from VBAK table with respect to the input screen fields
* 4 Bind the output to the CN_RESULT context to be displayed in the screen
Lets READ screen data first.
Put the cursor at the perfect locations, hit the wizzard symbol (we call it Wizardry WAND), select READ Activity and afterward select the Determination Screen Setting. Code is set up to peruse the screen information and kept in workarea/structure ls_cn_sel_screen. In the wake of erasing remarked and undesirable auto-produced code, we are left with these codes.
If it’s not too much trouble, note, you might have utilized the wizard to peruse individual fields rather than entire design. All things considered, you would have three variable, one each for client id, from date and until this point in time. Both the way would prompt your answer. Be that as it may, subsequent choice would create more lines of codes.
Now, lets SET final output data.
Put the cursor at wanted place, hit the Enchanted WAND, make a point to choose SET and As Table Activity (as the result would be shown in numerous lines). Auto code are produced and subsequent to erasing remarked line and undesirable code, beneath helpful lines are left. LT_CN_RESULT is the last inward table which ought to be populated to show the outcome.
In this way, we have code to peruse screen information and show to screen information. Be that as it may, what might we display!!!! We want to Choose information from data set and pass it to yield setting.
Before LT_CN_RESULT been will without a doubt screen, we should pick the data and populate it. This is the principal piece of code scrap an originator needs to create by him/herself for this application. Isn’t this cool. Less code…
Stage 7: Lets test.
Execute your application, give a substantial client id and some date range. Bingo.. The result is shown in the table.
This is a straightforward post to show yield in table. We ought to deal with the mistakes, additionally the result table skeleton ought not be shown when we see the page first. Sections ought to be shown once client raises a ruckus around town button. Additionally, the date reach ought to be dealt with so that, To date isn’t not exactly From date.
We will demonstrate the way that you can accomplish these necessities in basic stunts in our next post. Kindly stay tuned.
If it’s not too much trouble, let us know, in the event that you face any issue in any of the means. We would very much love to expound them.
Much thanks for your time!!
YOU MAY BE INTERESTED IN