2013년 10월 8일 화요일

[ABAP] SUBMIT으로 프로그램 호출시 Report화면 Skip하기


Report 화면을 submit으로 부를 때 리포트의 결과화면을 건너띄고
데이타만 Memory로 가져오고 싶을 때


  DATA: LV_MEMORYID(50)

  LV_MEMORYID = 'GT_ZCOR0XXX'.

  SUBMIT ZCOR0XXX WITH P_BUKRS = '1000'
                  WITH P_ZPERIO  = '201307'
                  EXPORTING LIST TO MEMORY
                  AND RETURN.

  CALL FUNCTION 'LIST_FREE_MEMORY'.

  IMPORT GT_ZCOR0XXX FROM MEMORY ID LV_MEMORYID.

  FREE MEMORY ID LV_MEMORYID.

2013년 8월 30일 금요일

[CO-CCA] Standard Hierarchy Inconsistencies (코스트센터가 표준계층구조에 중복되어 나타날 때)

Issue: one Cost Center is repeating in more than one node in Cost Center Standard Hierarchy.




Update from SAP Global support, the following was the email received:

in transaction KSH3 please run both the ambiguity and completeness check(Menu -> Extras -> Check and Help functions).
If you think that your standard hierarchy is inconsistent you can check that as following:
Run transaction Extras -> Hierarchy - Master data -> Test. The result shows you if there are in consistencies. If that is the case run also Extras -> Hierarchy - Master data -> Comparison.

Alternatively, you can run the report 'RKCORRH1' (TN SE38).


Run both the Hierarchy->Master data->test and the
Hierarchy->Master data->comparison.
As stated above inconsistency message showed after Test. Run the comparison and you get a similar message.
Once the above two are run, again when you go to test, the inconsistency disappears.

If it is successful, please assign points


Reprt 'RKCORRH1'



2013년 5월 23일 목요일

[ABAP, CO-PA] CO-PA Value Field text table : DD04T


DD04T : R/3 DD: Data element Text

TKEF : CO-PA Field catalog


SELECT T~FIENM D~DDTEXT D~REPTEXT
             D~SCRTEXT_S D~SCRTEXT_M D~SCRTEXT_L
   FROM TKEF AS T JOIN DD04T AS D
       ON T~ROLNM = D~ROLLNAME
 WHERE T~FIENM LIKE 'VV%'


* Value field created by you must begin with "VV"

2013년 5월 22일 수요일

[ABAP] SM12 - 사용자 OO가 OO를 편집중입니다.

또다른 세션창이 없고
해당파일을 수정하는 다른 유저도 없는데
활성화시에

" 사용자 OO가 OO를 편집중입니다." 라는 메시지가 나타날 경우.

SM12에서 조회 후 삭제 가능.



메시지번호 EU510

Diagnosis
You attempted to change a Workbench object.

System Response
This object is currently being edited by another user and is therefore locked (by an ENQUEUE lock).

Procedure
Wait until the other user has finished.

If the ENQUEUE lock remains as a result of a mode termination or due to other serious problems in the lock administration and no other user is editing the object, you can delete the lock using Transaction SM12. This operation is logged by the system.

2013년 5월 15일 수요일

[ABAP] Comparing Strings


http://help.sap.com/saphelp_bw/helpdata/en/fc/eb3516358411d1829f0000e829fbfe/content.htm

<operator>
Meaning
CO
Contains Only
CN
Contains Not only
CA
Contains Any
NA
contains Not Any
CS
Contains String
NS
contains No String
CP
Contains Pattern
NP
contains No Pattern

<f1>
<operator>
<f2>
Result
SY-FDPOS
'BD '
CO
'ABCD '
true
5
'BD '
CO
'ABCDE'
false
2
'ABC12'
CN
'ABCD '
true
3
'ABABC'
CN
'ABCD '
false
5
'ABcde'
CA
'Bd '
true
1
'ABcde'
CA
'bD '
false
5
'ABAB '
NA
'AB '
false
0
'ababa'
NA
'AB '
true
5
'ABcde'
CS
'bC '
true
1
'ABcde'
CS
'ce '
false
5
'ABcde'
NS
'bC '
false
1
'ABcde'
NS
'ce '
true
5
'ABcde'
CP
'*b*'
true
1
'ABcde'
CP
'*#b*'
false
5
'ABcde'
NP
'*b*'
false
1
'ABcde'
NP
'*#b*'
true
5

2013년 5월 6일 월요일

[ABAP] Lotto 6/45




REPORT Z_LOTTO.

TYPESBEGIN OF LOTTO,
        NUM TYPE INT2,
      END OF LOTTO.

* Sorted table with unique key : Auto sorting & no duplication.
" 1 Game.
DATALT_GAME TYPE SORTED TABLE OF LOTTO
      WITH UNIQUE KEY NUM WITH HEADER LINE.

" 5 Game.
DATABEGIN OF LT_5GAME OCCURS 0,
       GAME LIKE TABLE OF LT_GAME,
      END OF LT_5GAME.
DATALS_GAME LIKE LINE OF LT_GAME.

DATALV_CNT(1TYPE N.

DO TIMES. " make 5 game.
  CLEARLT_GAMELT_GAME[]LT_5GAMELV_CNT.

  WHILE LV_CNT < 6. " get number until 6.

     CALL FUNCTION 'RANDOM_I2'    " random function.
     EXPORTING
       RND_MIN         1
       RND_MAX         45
     IMPORTING
       RND_VALUE       LT_GAME-NUM.

     INSERT TABLE LT_GAME.

     LV_CNT LINESLT_GAME ). "number count

  ENDWHILE.

  LT_5GAME-GAME LT_GAME[].
  APPEND LT_5GAME.

ENDDO.

" display.
LOOP AT LT_5GAME.
  LOOP AT LT_5GAME-GAME INTO LS_GAME.

   WRITELS_GAME-NUM  .
  ENDLOOP.
  WRITE /.
ENDLOOP.