Advertisement
yaramohamed78

ZS_DDL

Jan 18th, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 2.64 KB | None | 0 0
  1. **&---------------------------------------------------------------------*
  2. **& Report  ZS_DDL
  3. **&
  4. **&---------------------------------------------------------------------*
  5. **&
  6. **&
  7. **&---------------------------------------------------------------------*
  8. *
  9. REPORT zs_ddl.
  10.  
  11. Parameters: test1 like ZASG_EMP-EMPPOSITION as listbox visible length 20.
  12. *
  13. *DEFINE lb_macro_koart.
  14. *
  15. *  selection-screen begin of line.
  16. *  selection-screen comment 1(31) &3.
  17. *  parameters: &1 as listbox visible length &2 obligatory.
  18. *  selection-screen end of line.
  19. *
  20. *END-OF-DEFINITION.
  21. *
  22. *
  23. *************************************************************************
  24. ** SELECTION-SCREEN *
  25. *************************************************************************
  26. *SELECTION-SCREEN BEGIN OF BLOCK s1 WITH FRAME TITLE text-001.
  27. *lb_macro_koart mylist(1) 5 comment.
  28. *SELECTION-SCREEN END OF BLOCK s1.
  29. *
  30. *
  31. *************************************************************************
  32. ** AT SELECTION - SCREEN
  33. *************************************************************************
  34. *AT SELECTION-SCREEN OUTPUT.
  35. *
  36. *  PERFORM add_values_to_koart.
  37. *  comment = 'Account type'.
  38. *
  39. *
  40. *
  41. **&---------------------------------------------------------------------*
  42. **& Form ADD_VALUES_TO_KOART
  43. **&---------------------------------------------------------------------*
  44. ** Fill the values in dropdownlistbox
  45. **----------------------------------------------------------------------*
  46. *FORM add_values_to_koart .
  47. *
  48. *  TYPE-POOLS: vrm.
  49. *
  50. *  DATA: my_list TYPE vrm_values,
  51. *  value LIKE LINE OF my_list.
  52. *
  53. *  DATA : BEGIN OF i_tab OCCURS 0,
  54. *  koart TYPE c,
  55. *  END OF i_tab.
  56. *
  57. *  CLEAR i_tab.
  58. *  i_tab-koart = 'A'.
  59. *  APPEND i_tab.
  60. *  CLEAR i_tab.
  61. *
  62. *  i_tab-koart = 'D'.
  63. *  APPEND i_tab.
  64. *  CLEAR i_tab.
  65. *
  66. *  i_tab-koart = 'K'.
  67. *  APPEND i_tab.
  68. *  CLEAR i_tab.
  69. *
  70. *  i_tab-koart = 'M'.
  71. *  APPEND i_tab.
  72. *  CLEAR i_tab.
  73. *
  74. *  i_tab-koart = 'S'.
  75. *  APPEND i_tab.
  76. *  CLEAR i_tab.
  77. *
  78. *
  79. **&---------------------------------------------------------------------*
  80. **& Filling the list structure with values from MARA table
  81. **&---------------------------------------------------------------------*
  82. *
  83. *  LOOP AT i_tab.
  84. *    value-key = sy-tabix.
  85. *    value-text = i_tab-koart.
  86. *    APPEND value TO my_list.
  87. *  ENDLOOP.
  88. *
  89. **&---------------------------------------------------------------------*
  90. **& Finally calling the function module to create the list box.
  91. **&---------------------------------------------------------------------*
  92. *
  93. *  CALL FUNCTION 'VRM_SET_VALUES'
  94. *    EXPORTING
  95. *      id     = 'MYLIST'
  96. *      values = my_list.
  97. *
  98. *
  99. *ENDFORM. " ADD_VALUES_TO_KOART
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement