Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all 8332 articles
Browse latest View live

ERROR: Template interpretation terminated, syntax error. (termination: RABAX_STATE)

$
0
0

Hi Experts,

 

I am getting below error while testing internet service. also it is giving dump ITS_UNEXPECTED_TOKEN in ST22.

 

ERROR: Template interpretation terminated, syntax error. (termination: RABAX_STATE).

 

please help me to resolve the issue.

 

Thanks in advance.

 

 

Regards,

Suchetha


Display SM37 result screen from my custom report

$
0
0

Hi Experts,

 

I have a customer requirement to display SM37 result screen from my custom report for few specific jobs.

I tried using' SUBMIT' statement but cannot do so as Standard job for SM37 is a function pool.

Also when I use 'Call Transaction and skip first screen' it takes me to the selection screen of SM37

but I want to give selection parameters from my report and want result screen of SM37 after execution of zreport.

 

 

Thanks and Regards,

Shivangi

what is TADIR entry?

$
0
0

Hi experts,

                What is TADIR entty??

When i run a report nothing is getting selected.but in the number of entries it is having some record.

The message is coming in the program that no TADIR entry found for the program.What is the meaning fir it?

 

regards,

manikandan

Setting low and high for select option

$
0
0

We have a requirement for a select option field which will allow the user to select from a choice of ranges in a pop up dialog box.

This popup will appear when selecting either the low or high field and will be triggered from the at selection-screen on value-request event (for both low and high).

Depending on the range chosen by the user I want to populate the low and high fields respectively.

The following code only populates the low field (presumably due to the way the event handles the screen processing) and the only way I can get the high field populated is to add the 'leave to screen 1000' statement but this clears out any other user entered selections.

 

Any ideas on the best way of achieving this requirement?

 

report ztest.

tables: fkkvkp.

select-options: s_vkont for fkkvkp-vkont obligatory.

at selection-screen on value-request for s_vkont-low.

  s_vkont-sign = 'I'.  s_vkont-option = 'BT'.  s_vkont-low = '5000000000'.  s_vkont-high = '5999999999'.  append s_vkont.  
start-of-selection.

 

How to add multiple columns of internal table

$
0
0

Hi Friends,

 

I am joining 2 tables and stores the value in an internal table.

 

the structure of the final internal table is as follows.

 

ZPROJID   ZCOST  ZDEF ZEFF
TEST1       10           20     30

TEST1       10           20     30

TEST1       10           20     30

TEST2       20           20     30

TEST2       20           20     30

TEST2       20           20     30

 

Now I have add ZCOST ZDEF and ZEFF for each project id

 

I need the output like

ZPROJID   ZCOST  ZDEF ZEFF

TEST1         30          60      90

TEST2         60          60      90.

 

how to add multiple columns based on ZPROJID.

 

 

Thanks for your help.

 

Regards,

Vijay.

BSEG performance issue.

$
0
0

Hi All,

 

     Here I am using BSID, BSAD, BSIK, BSAK table instead of BSEG table for performance optimization. For one document I got 2 line items (1 & 6) from BSAD table which have some value in AUGDT. I want rest of the line items from any index table but i could not get the line items from those table.

 

Capture.JPG

I checked the bseg table, there the line items are below.

Capture.JPG

Can anyone give me any clue where i will get the other line items.

 

Thanks,

Satya

Display issue with Drill Down ALV report in OO

$
0
0

Hello,

 

I am developing an ABAP-OO logic for a drill down report(VBAK->VBAP based on sales document number in VBAK) using OO factory methods and Splitter class and Grids as below.When I click on sales document from first ALV all its items are displayed in second ALV.The problem here is it is returning the appropriate line items only two times when clicked on any two sales documents.After that it keeps on returning the last clicked sales document items and does not display items accordingly.Below is my code:

 

Below is the method that is called when the sales document number from ALV1 is clicked:

 

 

 

In the above code first it accurately retrieves values from VBAP for the clicked sales document number.But below is the display_item( ) method logic which I guess is problematic:

 

 

 

Please help in case I am going wrong somewhere.

 

Regards

Mithil

getting error while executing script

$
0
0

Iam printing a script  for cash payments in fbcj transaction.I collected data from three internal tables into a final internal table.But while executing iam getting error stating that 'write form is invalid start form is missing.here is my code:

 

PARAMETERS: P_COCODE TYPE TCJ_POSITIONS-COMP_CODE,

             P_BRANCH TYPE TCJ_POSITIONS-CAJO_NUMBER.

 

DATA: BEGIN OF ITAB1 OCCURS 0,

         COMP_CODE    TYPE TCJ_POSITIONS-COMP_CODE,

         CAJO_NUMBER  TYPE TCJ_POSITIONS-CAJO_NUMBER,

         P_PAYMENTS   TYPE TCJ_POSITIONS-P_PAYMENTS,

         GL_ACCOUNT   TYPE TCJ_POSITIONS-GL_ACCOUNT,

         KOSTL        TYPE TCJ_POSITIONS-KOSTL,

         PRCTR        TYPE TCJ_POSITIONS-PRCTR,

       END OF ITAB1.

 

  DATA:BEGIN OF ITAB2 OCCURS 0,

         CAJO_NUMBER      TYPE TCJ_DOCUMENTS-CAJO_NUMBER,

         DOCUMENT_DATE    TYPE TCJ_DOCUMENTS-DOCUMENT_DATE,

         DOCUMENT_NUMBER  TYPE TCJ_DOCUMENTS-DOCUMENT_NUMBER,

       END OF ITAB2.

 

  DATA:BEGIN OF ITAB3 OCCURS 0,

         CAJO_NUMBER TYPE TCJ_CJ_NAMES-CAJO_NUMBER,

         CAJO_NAME  TYPE TCJ_CJ_NAMES-CAJO_NAME,

       END OF ITAB3.

 

  DATA: BEGIN OF ITAB4 OCCURS 0,

         COMP_CODE    TYPE TCJ_POSITIONS-COMP_CODE,

         CAJO_NUMBER  TYPE TCJ_POSITIONS-CAJO_NUMBER,

         P_PAYMENTS   TYPE TCJ_POSITIONS-P_PAYMENTS,

         GL_ACCOUNT   TYPE TCJ_POSITIONS-GL_ACCOUNT,

         KOSTL        TYPE TCJ_POSITIONS-KOSTL,

         PRCTR        TYPE TCJ_POSITIONS-PRCTR,

         DOCUMENT_DATE    TYPE TCJ_DOCUMENTS-DOCUMENT_DATE,

         DOCUMENT_NUMBER  TYPE TCJ_DOCUMENTS-DOCUMENT_NUMBER,

         CAJO_NAME  TYPE TCJ_CJ_NAMES-CAJO_NAME,

        END OF ITAB4.

 

 

  DATA: WA_TAB1 LIKE LINE OF ITAB1,

        WA_TAB2 LIKE LINE OF ITAB2,

        WA_TAB3 LIKE LINE OF ITAB3,

        WA_TAB4 LIKE LINE OF ITAB4.

 

 

  SELECT COMP_CODE CAJO_NUMBER P_PAYMENTS GL_ACCOUNT KOSTL PRCTR FROM TCJ_POSITIONS INTO TABLE ITAB1 WHERE COMP_CODE = P_COCODE AND

                                                                                                         CAJO_NUMBER = P_BRANCH.

 

  SELECT CAJO_NUMBER DOCUMENT_DATE DOCUMENT_NUMBER FROM TCJ_DOCUMENTS INTO TABLE ITAB2 FOR ALL ENTRIES IN ITAB1 WHERE COMP_CODE = ITAB1-COMP_CODE

                                                                                 AND CAJO_NUMBER = ITAB1-CAJO_NUMBER.

 

SELECT  CAJO_NUMBER CAJO_NAME FROM TCJ_CJ_NAMES INTO TABLE ITAB3 FOR ALL ENTRIES IN ITAB1 WHERE COMP_CODE = ITAB1-COMP_CODE AND

                                                                                     CAJO_NUMBER = ITAB1-CAJO_NUMBER.

 

   LOOP AT ITAB1 INTO WA_TAB1.

     WA_TAB4-COMP_CODE   = WA_TAB1-COMP_CODE.

     WA_TAB4-CAJO_NUMBER = WA_TAB1-CAJO_NUMBER.

     WA_TAB4-P_PAYMENTS  = WA_TAB1-P_PAYMENTS.

     WA_TAB4-GL_ACCOUNT  = WA_TAB1-GL_ACCOUNT.

     WA_TAB4-KOSTL       = WA_TAB1-KOSTL.

     WA_TAB4-PRCTR       = WA_TAB1-PRCTR.

 

     READ TABLE ITAB2 WITH KEY CAJO_NUMBER = WA_TAB1-COMP_CODE.

     WA_TAB4-DOCUMENT_DATE   = WA_TAB2-DOCUMENT_DATE.

     WA_TAB4-DOCUMENT_NUMBER = WA_TAB2-DOCUMENT_NUMBER.

 

     READ TABLE ITAB3 WITH KEY CAJO_NUMBER = WA_TAB1-COMP_CODE.

     WA_TAB4-CAJO_NAME    WA_TAB3-CAJO_NAME.

 

     APPEND WA_TAB4 TO ITAB4.

  ENDLOOP.

 

  CALL FUNCTION 'OPEN_FORM'

   EXPORTING

     FORM                              = 'ZCASHPAYMENTS'.

 

  CALL FUNCTION 'WRITE_FORM'

   EXPORTING

     ELEMENT                        = 'E1'.

 

  LOOP AT ITAB4 INTO WA_TAB4.

  CALL FUNCTION 'WRITE_FORM'

   EXPORTING

     ELEMENT                        = 'E2'.

  ENDLOOP.

 

  CALL FUNCTION 'WRITE_FORM'

   EXPORTING

     ELEMENT                        = 'E3'.

 

LOOP AT ITAB4 INTO WA_TAB4.

CALL FUNCTION 'WRITE_FORM'

   EXPORTING

     ELEMENT                        = 'E4'.

ENDLOOP.

 

  CALL FUNCTION 'CLOSE_FORM'.


Iam attaching a screen of text element too and I used only one page window


Date Field in Editable OOALV - CL_GUI_ALV_GRID

$
0
0

Dear Team,

 

I have a requirement in which I need to save the date in MM/DD format(without YYYY) in a custom table. This date is also used in an editable OO-ALV(CL_GUI_ALV_GRID) where the users would input in MM/DD format and save it. I searched for a field/data element in the system and found the data element P20_ENDDM(Numc 4), but this is not an exact match and the date format on the ALV does not show up as MM/DD, but as MMDD. I am yet to try the edit mask but am not sure if the system would accept the edit mask as "__/__". I have already searched in SDN for a solution but could not find any closer match; Please advise.

 

Thank you,

Naga

Way to check functional location hierarchy

$
0
0

Hello guys,

 

I'm looking for a clever coding snippet how to check our custom functional location hierarchy.

Here is the information about it:

 

Layer 1: D

Layer 2: D0000

Layer 3: D0000VK

Layer 4: D0000VK-0100

Layer 5: D0000VK-0100-ABCD

Layer 6: D0000VK-0100-ABCD-ABCD

Layer 7: D0000VK-0100-ABCD-ABCD-ABCDE

 

The first 4 layer always look like that. At the moment only layer 7 can differ at its number of characters, but I want to make it that flexible that from layer 5 to 7 it does not matter how many characters there are, because I can get the layer with help of '-' sign.

 

Now I want for every functional location layer to check if its in its right place in the hierarchy. So far so good I tried with splitting into seven fields and asking the layer position by counting not initial layer fields.

 

MOVE gs_iflot-tplnr+0(1TO gs_data-tplnr01.

MOVE gs_iflot-tplnr+1(4TO gs_data-tplnr02.
MOVE gs_iflot-tplnr+5(2TO gs_data-tplnr03.

MOVE gs_iflot-tplnr+8(4TO gs_data-tplnr04.


SPLIT gs_iflot-tplnr+13 AT '-' INTO
    gs_data-tplnr05 gs_data-tplnr06 gs_data-tplnr07.



MOVE gs_iflot-tplma+0(1TO gs_data-tplma01.
MOVE gs_iflot-tplma+1(4TO gs_data-tplma02.
MOVE gs_iflot-tplma+5(2TO gs_data-tplma03.
MOVE gs_iflot-tplma+8(4TO gs_data-tplma04.

SPLIT gs_iflot-tplma+13 AT '-' INTO
    gs_data-tplma05 gs_data-tplma06 gs_data-tplma07.

 

When difference between layer position of superior functional location and functional location is more than 1, then there is some mistake in the hierarchy. This works fine, but unfortunately there is no need to fill every layer when creating functional locations, e.g. there can be functional locations D0000VK-0100-ABCD (layer 5) and D0000VK-0100-ABCD-ABCD-ABCDE (layer 7) without layer 6. This would only be wrong if layer 6 actually exists! (wrong hierarchy happens e.g. wehen layer 5 and layer 7 were created at once and layer 6 was created afterwards).

 

With my check I only want to display wrong layer hierarchies where some layer is taken out but the taken out layer really exists. How to do this quite smart? :-)

 

 

Regards
Michael

posting a doc using FMBB

$
0
0

Hi,

 

I am using FM 'BAPI_0050_CREATE' to prepost a budgeting document and it works fine but now when I go to transaction FMBB to post the same document the 'Post document' icon is greyed out, do you have any idea why is it so?

 

Thanks,

Enhancement for SCASE transaction Credit Limit Request

$
0
0

Hi, I have a requirement to make comments in SCASE mandatory? In every approval, a comment should be mandatory.

What would be the best approach to meet this requirement?

 

Option given is a BADI, anyone who can give an idea on what is the best solution for this?

SCMG_VALIDATE_C                             Additional Checks on Case

SCMG_VLDT_BFR_STR_C                    Attribute Checks for Save Only

SCMG_BEFORE_VALID_C                    Change Case Before Validation

SCMG_CASE_EVENT_S                       Case: After Case

SCMG_CHNG_BFR_STR_C                   Changes at Save Only (Type 2)

SCMG_STORE_S                                  Event After Saved Case: Change Own Tabl

SCMG_INITIALIZE_C                             Initialization of Case Attributes (Type

 

 

Thanks in Advance.

read return parameter of function module

$
0
0

hi,

 

i am calling an function module and get back lc_element:

Capture.PNG

 

lc_element is defined this way:


lc_element        TYPE REF TO if_swf_cnt_element,


so far so good. when i set debugger after the call of the FM i get something like this when i click on lc_element:


Capture.PNG


i have NO idea of how to get the values of e.g. M_NAME or the values in the deep structure M_ELEM_REF. i can't loop over the lc_element as this is not an table.


so how can i access the data coming back into lc_element ?


br Martin



Problem with BAPI_RESERVATION_CREATE into Badi.

$
0
0

Hi Gurus,

 

 

I'm trying to implement BAPI_RESERVATION_CREATE into badi WORKORDER_UPDATE.

 

However with my code I'm getting the error:

 

AnalErrores.JPG

 

The code is:


methodIF_EX_WORKORDER_UPDATE~BEFORE_UPDATE.


TYPES: BEGIN OF t_resb.
       
INCLUDE TYPE  bapiresbc.
TYPES: END OF t_resb.

TYPES: BEGIN OF t_rkpf.
       
INCLUDE TYPE bapirkpfc.
TYPES: END OF t_rkpf.

DATA :  i_resb    TYPE STANDARD TABLE OF T_RESB INITIAL SIZE 0,
        wa_resb  
TYPE t_resb.

DATA :  i_rkpf    TYPE STANDARD TABLE OF t_rkpf,
        wa_rkpf  
TYPE t_rkpf.

DATA:   i_returnTYPE TABLE OF bapireturn.
DATA: vl_rsnumTYPE rkpf-rsnum.

wa_resb
-GR_RCPT    = 'A000'.
wa_resb-plant    
= '2000'.
wa_resb
-material  = '000000000000000008'.
wa_resb-store_loc
= '0002'.
wa_resb-quantity 
= '90.00'.
wa_resb-unit
      = 'G'.
wa_resb-movement 
= 'X'.

Appendwa_resbto i_resb.

wa_rkpf-plant    
= '2000'.
wa_rkpf-res_date 
= sy-datum.
wa_rkpf-move_type
= '311'.

Appendwa_rkpfto i_rkpf.

break-point.
CALL FUNCTION 'BAPI_RESERVATION_CREATE'
 
EXPORTING
    reservation_header
= i_rkpf
 
IMPORTING
    reservation       
= vl_rsnum
 
TABLES
    reservation_items  =
i_resb
   
return             = i_return.
endmethod.

Please help!

 

Disable subscreen iw32

$
0
0

Hi All,

 

I have the below requirement.

I need to disable any input to iw32 - long text area based on a condition.

This long text area is a sub screen.

 

How can we disable subscreens in standard tcode ?

 

Regards

Meenakshi


Comma without preceding colon (after SELECT ?).

$
0
0

HI Experts . I have a problem with my smartform it is showing error as

Comma without preceding colon (after SELECT ?).

 

my code is

select single rmwwr lifnr budat from rbkp

          into (z_rmwwr,

          z_lifnr,

          z_budat)

where belnr = z_belnr

and   gjahr = z_gjahr.

 

select single name1 stras ort01 ort02 pstlz from lfa1

          into (z_name1,

           z_stras,

           z_ort01,

           z_orto2,

           z_pstlz)

  where lifnr = z_lifnr.

Access BDC table in called transaction

$
0
0

Hi,

 

my customer uses a functionality where the SAP standard makes use of CALL TRANSACTION USING bdctab.

Now, within processing the called transaction, I would like to know the content of the BDC table passed.

Within the transaction, I have no callstack and, as it runs in its own LUW, no chance to dynamic assign the bdc data table.

I don not want to apply a modification to the standard by exporting the BDC table immediately before calling the transaction.

Any good idea?

Thank You and

best regards Clemens

Common (FB01, F-28, FBRA and FB08) Enhancement place for Document Posting in FI

$
0
0

Hi All,

 

Even though I've search a lot in SDN before posting the below Discussion. But non of the solutions were fulfilled my exact scenario. 

 

My requirement is to find ONE COMMON Enhancement place where i have to do some validations on posting dates

just BEFORE accounting document posting in FI.

 

Mainly the TCodes of FB01, F-28, FBRA and FB08.

 

Kindly let me know any EXIT, BADI or Implicit Enhancement.

 

Note:

 

1. Basically its a Validation level. Until unless its been passed, document should not be posted.

2. It should work for all the above TCodes. A Common Place.

 

With Regards,

Sudhir.

Multiple update statement not updating the table

$
0
0

Hi All,

 

I'm updating EKPO table using 2 update statements as follows.

 

1. If first update statement is successful ,COMMIT and WAIT.

then,

2.perform the next update.

 

This works when I'm creating the PO in but when im doing it using 4(send immediately) then I get a

dump " COMMIT IN POSTING'.

 

Please help.

 

Thanks,

Faiz

Issue with Withholding tax in bapi_acc_document_post

$
0
0

Hi Experts,

 

We are trying to post an accounting docment with the help of BAPI bapi_acc_document_post. It is posting good except for the
fact that with holding tax is not coming or is coming wrongly. The tax code is taken from BSEG table field QSSKZ.

Code snippet

  IF LS_FINAL-QSSKZ IS NOT INITIAL.
      LS_ACCWITHTAX-ITEMNO_ACC = LS_FINAL-BUZEI.
      LS_ACCWITHTAX-WT_CODE    = LS_FINAL-QSSKZ.
      APPEND LS_ACCWITHTAX TO LT_ACCWITHTAX.
   CLEAR: LS_ACCWITHTAX.

Viewing all 8332 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>