Quantcast
Channel: SCN : Unanswered Discussions - ABAP Development
Viewing all 8768 articles
Browse latest View live

Multiple Infotype operation in simulation mode

$
0
0

Hi All,

 

We have a requirement to first delete a infotype record and then add another record in simulation mode or to add multiple new record in simulation. Can you please let me know how to implement this functionality.

 

Thanks in advance.

 

Srikanta


Issue with dynamic SELECT statement

$
0
0

Hi All,

 

I use a dynamic SELECT statement as below:

 

SELECT (lt_select_flds)

            FROM (lf_tab_name)

            INTO CORRESPONDING FIELDS OF TABLE <lt_data_tab>

            FOR ALL ENTRIES IN <lt_source_data>

            WHERE (lf_where).

 

I am facing issues because the lengths of fields in <lt_source_data> & <lt_data_tab> are different [Source Data field lengths are double that of target field length]. How do I handle this situation and make the SELECT statement work?

After Shipment cancel want to update VEKP-INHALT field

$
0
0

Hello Friends Please help as soon as possible..

 

I want to Update VEKP-inhalt field affter shipment cancel but it is not updating

 

I am using below code

DATA:   LS_ENH_CANCEL LIKE LINE OF IT_HUS,

         LT_ENH_UPDATE_HEADER TYPE HUM_UPDATE_HEADER_T,

         LS_ENH_UPDATE_HEADER TYPE HUM_UPDATE_HEADER,

         LT_MESSAGES          TYPE HUITEM_MESSAGES_T,

         LT_ENH_VENUM         TYPE HUM_VENUM_T,

         LT_HEADER            TYPE HUM_HU_HEADER_T.

 

 

LOOP AT IT_HUS INTO LS_ENH_CANCEL.

    LS_ENH_UPDATE_HEADER-HDL_UNIT_ITID = LS_ENH_CANCEL-VENUM.

   LS_ENH_UPDATE_HEADER-HDL_UNIT_EXID = LS_ENH_CANCEL-EXIDV.

   LS_ENH_UPDATE_HEADER-FIELD_NAME = 'INHALT'.

   LS_ENH_UPDATE_HEADER-FIELD_VALUE = SPACE.

   CONDENSE LS_ENH_UPDATE_HEADER-FIELD_VALUE.

   APPEND LS_ENH_UPDATE_HEADER TO LT_ENH_UPDATE_HEADER.

     APPEND LS_ENH_CANCEL-VENUM TO LT_ENH_VENUM.

   ENDLOOP.

 

   CALL FUNCTION 'HU_GET_HUS'

     EXPORTING

       IF_LOCK_HUS     = 'X'

       IT_VENUM        = LT_ENH_VENUM

     EXCEPTIONS

       HUS_LOCKED      = 01

       NO_HU_FOUND     = 02

       OTHERS          = 99.

 

   IF SY-SUBRC = 0.

   CALL FUNCTION 'HU_HEADER_UPDATE'

     EXPORTING

       IT_NEW_VALUES = LT_ENH_UPDATE_HEADER

     IMPORTING

       ET_MESSAGES   = LT_MESSAGES

     EXCEPTIONS

       NOT_POSSIBLE  = 99.

   ENDIF.

 

   CALL FUNCTION 'HU_POST'

    EXPORTING

      IF_SYNCHRON          = 'X'

      IF_COMMIT            = ' '



In debug mode HU_HEADER_UPDATE function module  i have checked  AENDB field always becoming X after shipment cancel and it is skipping function module = V5IF_HU_HEADER_UPDATE.


Based on below IS_HEADER-ARNEB it is not updating

Inline image 4

 

 

Inline image 5

 

 

SY-SUBRC = 3.

 

Inline image 6

 

 

rfc issue

$
0
0

Hello ,

 

i am creating remote enable function module

here i want to select kunnr from kna1 where werks = from my destination system ( /posdw/tender - tender id)

how can i do this ,please help me .

SAPWL_WORKLOAD_GET_STATISTIC don't return data

$
0
0

Hi,

 

I tried using the function module

 

SAPWL_WORKLOAD_GET_STATISTIC
   PERIODTYPE = D
   STARTDATE = 20150423
   ONLY_APPLICATION_STATISTIC = X
   INSTANCE = TOTAL


I tested all the export table but always  this function module don't return data

 

 

Thank you in advance for the Help.

 

akrem

BRF structure binding to a DDIC structure which contains more than 30 structures as fields.

$
0
0

HI All,

 

BRF structure binding to a DDIC structure which contains more than 30 structures as fields. But it is restricting the max structures to 30 even if I refresh binding.

 

Please let me know how to do this.

 

Thanks,

Mahesh Pusala

'Submit' on dynamically generated adobe form

$
0
0

Hello,

 

I have a dynamic adobe form, which at run time generates the pages based on certain conditions. There are 3 sub-forms whose visibility is controlled via javascript ( again based on condition ). At run time, at once, one page can hold either of these sub-forms. This is an offline scenario and i have the submit button always coming up at the last page.

 

The issue is that,  when i click on 'Submit' only the data in the last page gets picked up for the web service. The data in the previous pages are not being picked up.

For ex : say Page 1 has sub form A

                   Page 2 has sub form B

                   Page 3 has sub form C,

the data in Page 3 alone is getting submitted.

 

However, if i generate the form only for A / B / C, (only one page scenario ) it works fine. The issue is when more than one page is generated.

 

How to make the submit button function across all the pages?

 

kindly help.

 

Regards,

Ashwitha

Balace amount in Customer ledger view.

$
0
0

Hi Masters,

 

Please help ......

 

I have an requirement like this

 

Opening Balance : 100.

 

debit          Credit                 balance

   20                                   120  ( Opening balance + debit (100 + 20) )

   30                                   150 (120+ 30 )

                 -30                    120(150-30)

                 -20                    100(120-20)     

 

 

Please give some idea and logic , so i will come out this issue . It's very urgent for me.

 

 

Please help to come out this issue. Special thanks in advance.

 

Thanks & regards

  Ranjit

9632864564


'SXPG_COMMAND_EXECUTE' Program for Print

$
0
0

Dear Experts,

 

In my system it is created 'ZPRINT' external command in SM69, and below is the code.

 

CustomerZPRINTWindows NTcmd /c

CALL FUNCTION 'SXPG_COMMAND_EXECUTE'

       EXPORTING

         commandname                   = 'ZPRINT'

         additional_parameters         = lv_add_parameters "

         operatingsystem               = 'Windows NT'


when ever program is run, Print is getting printer. Please help me where I can find the logic for the above external command.


Thank in advance.


Regards,

Kumar

PDF File Size calculation

$
0
0

When the output for the Delivery is triggered, PDF file is generated and saved on AL11 path. In another custom program, need to calculate the size of the PDF file generated and save the value. Let me know how we can achieve this.

Read RTF file

$
0
0

Hi all ,

 

I need to read RTF file in Back ground and save this in to Basic text of material .

For saving text there is no problem but to read RTF file background is not working using

IMPORT_TEXT because it is using GUI_UPLOAD .

 

So,How can i read RTF file in background ???

 


Thanks,

Mahipalsinh

Need to know table and fieldname

$
0
0

Dear Experts,

 

We wanted table name and fieldname of 15 fields for the Tcode KOB1 and have found the table/view of 10 fields. We still require table-fieldname for the following 5 fields.

 

CO Object Name

Cost Element Text     

Material Description

CO Partner Object Name

Value in rep. curr

 

Kindly help.

 

 

Regards

Mani Bhushan

How to download ALV output default format into Excel sheet using custom download button

$
0
0

Hi Experts,

 

I have requirement to download the alv output format in to excel sheet but while i am downloading using custom button system not downloading displayed format, Its downloading as per internal table set. So anyone can help me for this requirement.

 

Thanks,

Retrieving message types

$
0
0

Hi All , I want to know how message types are picked up on creation of a PO. I see that on creation of a PO message (output ) types are picked up on the basis of partner. The message types and associated partners are maintained in MN06.  I debugged the standard program (while creating PO ) to check how they're being selected  and found that they are picked up using FM  ME_MESSAGES_TYPE. The tables xnast gets populated with the message types . That said , the FM doesn't work in a standalone mode. Hence , I'm not able to use it in my program for which these message types have to be used . Please help . 

Program to check IDOC Status

$
0
0

Hi,

 

I am new to ABAP and this is my first assignment so request you to please help me with step wise details.

 

I have to create a program which should trigger the mail automatically to the specific set of people about the status of an IDOC as per the

 

Message Type,

Direction,

Message Variant,

Message Function.

 

 

Thank you

 

 

I hope this is markes as question


Choice between syncronous and asyncrous BDC

$
0
0

HI Experts,

can you kindly guide when one shall go for asynchronous BDC and when for syncronous BDC?

 

 

Thanks.

Services procurement - Pricing Access sequence error for Custom fields

$
0
0

Hi Experts,

 

We have created 3 custom fields in KOMP structure. Which is required to create condition tables, access sequence. We have successfully created condition tables with the 3 fields along with the standard fields.

 

While creating access sequence we are getting the error as 'Select a document field'. Even after providing the document field, getting some other errors. Please find the attached document for steps we followed.

 

We are awaiting for your reply to rectify the error.  Thanks.

 

Regards,

Ganesh R K.

BDC for MIGO for GR OutBound Delivery( A01 & R05 ) from Movement Type 107 to 109

$
0
0

Hi,

I am stuck with a very typical situation need all your expertise and advices for a solution.

 

We are basically trying to create change the movement type from 107 to 109 through MIGO.

I have made a BDC recording for MIGO ( because we would like to track each delivery specifically under shipment , I know that there is a BAPI which is there to do this but it works fine if we do the shipment with Purchase Order as input which dont want in that manner )

 

Process:

1. Creating Production Order

2. Creating Purchase Order

3. Creating STO

4. Deliveries

5. PGI for Deliveries

6. Shipment for group of outbound Deliveries

 

I have created a z program where i am passing shipment number in the selection screen.

Then it would take all the deliveries for that shipment and pass each delivery to MIGO and process it and change the status from 107 to 109.

 

Interesting part here is, the code works absolutely perfect only from my ID. But when I test from other ID it is not executing, so to check where is the problem I have added mess_tab to the CALL TRANSACTION to capture what message is been populated for my ID comparing with others

 

Message Captured on Others ID's:

MSGID: 00

MSGNR: 344

MSGV1: SAPLMIGO

MSGV2: 1300

 

Message Captured on MY ID:

MSGID: MIGO

MSGNR: 012

MSGV1: 5000005802

MSGV2: (empty)


This is the problem this program is executing only on MY ID, rest all ID's it is not processing.

We have cross verified with security and basis regarding any authorization issues but nothing came up.

Please help me what could be the issue ( WHY it is processing successfully for my and WHY NOT for other ID's)

 

 

 

Below is the main code :

 

CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'                     " Converting Date format to DD/MM/YYYY

     EXPORTING

       DATE_INTERNAL            = sy-datum

     IMPORTING

       DATE_EXTERNAL            = lv_date_external

     EXCEPTIONS

       DATE_INTERNAL_IS_INVALID = 1

       OTHERS                   = 2.

       IF SY-SUBRC <> 0.                                     "#EC NEEDED

* Implement suitable error handling here

       ENDIF.

 

********************************************************************************************

*   Validating input shipment number with database table VTTP

********************************************************************************************

       SELECT VTTP~TKNUM

              VTTP~TPNUM

              VTTP~VBELN

         FROM VTTP INNER JOIN VTTK

         ON VTTP~TKNUM = VTTK~TKNUM

         INTO TABLE IT_VTTP

         WHERE VTTK~TKNUM = P_TKNUM

           AND VTTK~STDIS = 'X'.

       IF sy-subrc = 0.

********************************************************************************************

*   Validating all deliveries having same Delivery type or not

********************************************************************************************

         SELECT * FROM likp INTO TABLE it_likp FOR ALL ENTRIES IN it_vttp WHERE vbeln = it_vttp-vbeln

                                                                            AND vbtyp = 'J'.

         IF sy-subrc = 0.

           CLEAR lv_lines.

           LOOP AT it_likp INTO wa_likp.

             REFRESH:it_vbfa,BDCDATA.

********************************************************************************************

*   Validating if Delivery Type = 109 (GR already done), or Delivery Type = 107 (must process for GR )

********************************************************************************************

             SELECT * FROM vbfa INTO TABLE it_vbfa WHERE vbelv = wa_likp-vbeln

*                                                AND vbtyp_v = 'J'

                                                     AND bwart = '109'.

             IF sy-subrc = 0.

               lv_flag1 = 'X'.

             ELSE.

               SELECT * FROM vbfa INTO TABLE it_vbfa WHERE vbelv = wa_likp-vbeln

*                                                  AND vbtyp_v = 'J'

                                                       AND bwart = '107'.

               IF sy-subrc NE 0.

                 MESSAGE 'No Deliveries with Movement Type "107" ' TYPE 'I'.

               ELSE.

                 lv_flag2 = 'X'.

                 lv_lines = lv_lines + 1.

*********************************************************************************************

**  BDC for MIGO

*********************************************************************************************

 

                 perform bdc_dynpro      using 'SAPLMIGO' '0001'.

                 perform bdc_field       using 'BDC_OKCODE'

                                               '=OK_GO'.

                 perform bdc_field       using 'GODYNPRO-ACTION'

                                               'A01'.

                 perform bdc_field       using 'GODYNPRO-REFDOC'

                                               'R05'.

                 perform bdc_field       using 'GODEFAULT_TV-BWART'

                                               '109'.

                 perform bdc_field       using 'BDC_CURSOR'

                                               'GODYNPRO-OUTBOUND_DELIVERY'.

                 perform bdc_field       using 'GODYNPRO-OUTBOUND_DELIVERY'

                                               wa_likp-vbeln. "'80019574'.

                 perform bdc_field       using 'GOHEAD-BLDAT'

                                               lv_date_external. "'04/29/2015'.

                 perform bdc_field       using 'GOHEAD-BUDAT'

                                               lv_date_external. "'04/29/2015'.

                 perform bdc_field       using 'GOHEAD-WEVER'

                                               '1'.

                 perform bdc_dynpro      using 'SAPLMIGO' '0001'.

                 perform bdc_field       using 'BDC_OKCODE'

                                               '=OK_POST1'.

                 perform bdc_field       using 'GODEFAULT_TV-BWART'

                                               '109'.

                 perform bdc_field       using 'GOHEAD-BLDAT'

                                               lv_date_external. "'04/29/2015'.

                 perform bdc_field       using 'GOHEAD-LFSNR'

                                               wa_likp-vbeln. "'0080019574'.

                 perform bdc_field       using 'GOHEAD-BUDAT'

                                               lv_date_external. "'04/29/2015'.

                 perform bdc_field       using 'GOHEAD-WEVER'

                                               '1'.

                 perform bdc_field       using 'GODYNPRO-DETAIL_ZEILE'

                                               '   1'.

                 perform bdc_field       using 'GOITEM-ERFME'

                                               'EA'.

                 perform bdc_field       using 'GOITEM-ERFMG'

                                               '1'.

                 perform bdc_field       using 'GOITEM-LSMNG'

                                               '1'.

                 perform bdc_field       using 'GOITEM-LSMEH'

                                               'EA'.

                 perform bdc_field       using 'GOITEM-MIGO_ELIKZ'

                                               '1'.

                 perform bdc_field       using 'GOITEM-BWART'

                                               '109'.

                 perform bdc_field       using 'GOITEM-LGOBE'

                                               'RX Cross-docking'.

                 perform bdc_field       using 'BDC_CURSOR'

                                               'GODYNPRO-DETAIL_TAKE'.

                 perform bdc_field       using 'GODYNPRO-DETAIL_TAKE'

                                               'X'.

***********************************************************************************

                 PERFORM bdc_dynpro      USING 'SAPLMIGO' '1300'.

                 PERFORM bdc_field       USING 'BDC_CURSOR'

                                               'G_TIP_DONT_SHOW_AGAIN'.

                 PERFORM bdc_field       USING 'BDC_OKCODE'

                                               '=OK_TIP_GO'.

                 PERFORM bdc_field       USING 'G_TIP_DONT_SHOW_AGAIN'

                                               'X'.

***********************************************************************************

*& Avoid unncessary screens to populate while processing background.

***********************************************************************************

                 LV_OPTIONS-DISMODE = 'N'.

                 LV_OPTIONS-UPDMODE = 'S'.

                 LV_OPTIONS-NOBINPT = 'X'.

***********************************************************************************

                 CALL TRANSACTION 'MIGO' USING BDCDATA  OPTIONS FROM LV_OPTIONS MESSAGES INTO IT_MESSTAB1 .

 

                 WAIT UP TO 1 SECONDS.

 

                 DELETE IT_MESSTAB1 WHERE MSGTYP NE 'E'.

                 IF IT_MESSTAB1[] IS NOT INITIAL.

                   APPEND LINES OF IT_MESSTAB1 TO IT_MESSTAB.

                 ENDIF.

               ENDIF.

             ENDIF.

           ENDLOOP.

         ENDIF.

       ELSE.

         MESSAGE 'Shipment Number does not exists Or not Planned' TYPE 'E'.

       ENDIF.

     ELSE.

       MESSAGE 'Please insert Shipment Number' TYPE 'E'.

     ENDIF.

 

     IF lv_flag1 = 'X' AND lv_flag2 = 'X'.

       MESSAGE 'This shipment is processed with an inconsistent goods receipt' TYPE 'I'.

     ELSEIF lv_flag1 = 'X'.

       MESSAGE 'Shipment already been processed for these deliveries' TYPE 'I'.

     ELSEIF lv_flag2 = 'X'.

       lv_lines1 = lv_lines.

       CONDENSE lv_lines1 NO-GAPS .

       CONCATENATE lv_lines1 'Goods Receipt are posted for the shipment '

              INTO lv_message SEPARATED BY space.

       MESSAGE  lv_message TYPE 'I'.

     ENDIF.

*----------------------------------------------------------------------*

* Display Messages from Message TAB.

*----------------------------------------------------------------------*

     DELETE ADJACENT DUPLICATES FROM IT_MESSTAB.

 

     DATA:lv_msg TYPE string.

 

     LOOP AT IT_MESSTAB INTO WA_MESSTAB.

 

       CALL FUNCTION 'FORMAT_MESSAGE'

         EXPORTING

           ID        = WA_MESSTAB-MSGID

           NO        = WA_MESSTAB-MSGNR

           V1        = WA_MESSTAB-MSGV1

           V2        = WA_MESSTAB-MSGV2

           V3        = WA_MESSTAB-MSGV3

           V4        = WA_MESSTAB-MSGV4

         IMPORTING

           MSG       = lv_msg

         EXCEPTIONS

           NOT_FOUND = 1

           OTHERS    = 2.

       IF sy-subrc <> 0.

* Implement suitable error handling here

       ENDIF.

 

       WRITE:/ lv_msg.

 

     ENDLOOP.

 

*----------------------------------------------------------------------*

*        Start new screen                                              *

*----------------------------------------------------------------------*

   FORM BDC_DYNPRO USING PROGRAM DYNPRO.                 "#EC PF_NO_TYPE

     CLEAR BDCDATA.

     BDCDATA-PROGRAM  = PROGRAM.

     BDCDATA-DYNPRO   = DYNPRO.

     BDCDATA-DYNBEGIN = 'X'.

     APPEND BDCDATA.

   ENDFORM.

 

*----------------------------------------------------------------------*

*        Insert field                                                  *

*----------------------------------------------------------------------*

   FORM BDC_FIELD USING FNAM FVAL.                       "#EC PF_NO_TYPE

     CLEAR BDCDATA.

     BDCDATA-FNAM = FNAM.

     BDCDATA-FVAL = FVAL.

     APPEND BDCDATA.

   ENDFORM.







Thanks,

Srini

NWBC 5.0 breaks ABAP in Eclipse

$
0
0

In Windows, after installing SAP GUI 7.40 Patch 2 Hot Fix 2, if I open NWBC 5.0 and then open Eclipse I get a SAPUILandscape.xml malformed error.....

 

Does this happen to everyone? Seems such a strange occurence... I basically need to keep a backup of that file, and reset it after opening NWBC 5.0. NWBC adds some tags that Eclipse seems to refuse/mishandle.

 

I checked and Eclipse Luna is updated.

Number range NR status does not match next number generated

$
0
0

Hi All ,

 

    I have a requirement in which i need to find out which number will be generated next .

 

    FM 'NUMBER_GET_NEXT' uses up the next number

 

    FM 'NUMBER_GET_INFO' tells me the NR status.

 

    But the NR status does not seem to match the next number generated or the last number generated.

 

    Example in my system NR status shows 20010 , but the next number generated is 100030 . I assuming that NR status would be the last number generated , if so then why is there an inconsistency .  I also checked the NRIV table but found 20010.

 

   So is there any way to find out the next number to be generated / last number generated ?

 

Thanks and Regards ,

Sheldon Rodrigues

Viewing all 8768 articles
Browse latest View live


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