Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to select the airline #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/zairline_info.prog.abap
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ CLASS ltc_airline_capacity_tests IMPLEMENTATION.

ENDCLASS.

SELECTION-SCREEN BEGIN OF BLOCK sel1 WITH FRAME TITLE TEXT-001.
PARAMETERS: p_carrid TYPE s_carr_id OBLIGATORY LOWER CASE.
SELECTION-SCREEN END OF BLOCK sel1.

*********************************************************************************************
* Execute Code
*********************************************************************************************
Expand All @@ -128,9 +132,9 @@ START-OF-SELECTION.

CREATE OBJECT o_airline_capacity.

available_capacity = o_airline_capacity->get_available_capacity( 'AA' ).
used_capacity = o_airline_capacity->get_used_capacity( 'AA' ).
total_capacity = o_airline_capacity->get_total_capacity( 'AA' ).
available_capacity = o_airline_capacity->get_available_capacity( p_carrid ).
used_capacity = o_airline_capacity->get_used_capacity( p_carrid ).
total_capacity = o_airline_capacity->get_total_capacity( p_carrid ).

WRITE: / 'The available capacity for airline AA is:', available_capacity.
WRITE: / 'The used capacity for airline AA is: ', used_capacity.
Expand Down
13 changes: 13 additions & 0 deletions src/zairline_info.prog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,24 @@
<UCCHECK>X</UCCHECK>
</PROGDIR>
<TPOOL>
<item>
<ID>I</ID>
<KEY>001</KEY>
<ENTRY>Selection Options</ENTRY>
<LENGTH>27</LENGTH>
</item>
<item>
<ID>R</ID>
<ENTRY>Program ZAIRLINE_INFO</ENTRY>
<LENGTH>21</LENGTH>
</item>
<item>
<ID>S</ID>
<KEY>P_CARRID</KEY>
<ENTRY>.</ENTRY>
<LENGTH>18</LENGTH>
<SPLIT>D</SPLIT>
</item>
</TPOOL>
</asx:values>
</asx:abap>
Expand Down