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

Simple transformation from XML to ITAB. Field length above char 255 not working.

$
0
0

Hi! Experts,

I have an  requirement in which I have to do a transformation from an XML file to internal table in which structure has a field of char1000 or string.

I used the transaction XSLT_TOOL and created a Simple transformation with the table type of required structure. But when I call the transform statement the text in the field gets truncated at 255 characters as it is returned in the internal table.

Please guide me how I can overcome this.

 

Thanks and Regards,

Arbaaz


SAPSCRIPT total no.of pages passing as 1 on First page, but need total no.of pages on 1st page.

$
0
0

Hi,

 

I have an issue in SAP Script. I am not able to pass the last page number (Example: If output has  3 pages) in the first page window. In the first page window on the Change Editor, I am calling a subroutine in the SAP SCRIPT to printer program by passing parameters to that subroutine &SAPSCRIPT-FORMPAGES& . While debugging I chceked the value SAPSCRIPT-FORMPAGES is 1 passing to that subrotine. My issue is I need to pass no.pages 3 to that Subroutine when the first page running. I appreciate your help.

 

   Requiremnet: In that subroutine I am taking  no.of pages  and doing some logic and appending no.of pages to the return variable. ,and return the value back to SAP Script. But the returned value always showing the no.of pages is 1. I am not able to pass to that subroutine  no.pages 03.

 

 

Thanks for your help.

 

 

Monica

 

Message was edited by: Monica Tubati

Outbound idoc stuck in que

$
0
0

Hi All,

 

we are sending outbound idocs from shipment documents in ECC. The issue is the idoc is  successfully processed (green ). But it does not reach PI.

 

for one shipment, we trigerred one outbound idoc but  when we see in SMQ1 for que SAP_ALE_EDIQUEUE  .we find 10 entries  with one entry at 14.20 saying an idoc exception ocured in pink.

 

the other nine entries shows that the transaction is recorded (all the nine entries have time 14.21 ). my questions are

 

1) what is SMq1. what it shows.

 

 

2) why there are ten entries shown for one outbound idoc from ECC.

 

 

3) Any reason why it is getting stucked. The above issue does not happen every time. only sometimes the idoc stuck.

 

4) in partner profile, we have "trigger immedtiately option " selected.

 

5) in the que entries in SMQ1, the FN name shown is "idoc inbound asynchronous". Our abap team  put a break point in this FM and try to trigger another idoc for same shipment but the system is not going into the FM ?

 

 

regards

Pamela

converting string field to type P and increasing length size in dynamic internal table

$
0
0

Hi,

 

I am working on dynamic internal table report list where I am facing data type and length size issue in the amount and quantity fields. For dynamic internal table, I am using class cl_abap_structdescr and calling CL_ABAP_OBJECTDESCR->GET_STRING  for appending field names. this leads to data type is string and the length is fixed based on the values. Due to this my Net amount and Quantity values are not translating CURR types and not able to write the value to Right-Justified in the output.

Output ex like;

Net amount                                                                  Quantity

305623.00   (to be 305.623,00 & right-justified)   25.00 (to be 25,00 & right-justified).


Please guide me how to fix this issue by changing the field type to P (Currency and Quantity type).


thanks.

How to Display two internal tables in ALV OUTPUT using Function Module Reuse_ALV_Hierarchical_Sequantial_Display??

$
0
0

Kindly give me some example.

 

Regards,

Abhishek K.

SAP ABAP Certified Trainee

&SAPSCRIPT-FORMPAGES& passing 1 on the first page for 3 pages output in SAP Script

$
0
0

Hi,

 

Issue when passing value of &SAPSCRIPT-FORMPAGES& to a Subroutine in the First page X window. It is always passing as 1 in the first page instead of 3. But my requirement pass to that subroutine total no. of page (Ex: 3) in the first page X window. How would it be possible? I appreciate your quick response.

 

 

 

Thanks,

Monica

Step by step process to restrict vendor payments under certain conditions in F110

$
0
0

Created by Venkat Reddy


Sample Scenario - If the date maintained in the vendor master is less than Payment Date then the payments made to that specific Vendor in the F110 run should not get paid.

 

 

Functional Configuration that needs to be done in transaction code - FIBF

Step-1 Product needs to be created.


Step-2 Under Process Module we have to assign the BTE-1830 and function module in which the logic is maintained to restrict the payments.


 

 

Technical Part

SAP Documentation of this function module -


 

 

Copy function module - SAMPLE_PROCESS_00001830 into Z.

Note: 'Z' Function module name should be the same as maintained in the config of process module in FIBF t-code.

Source Code


 

 

Code

* Local vaiable to hold gbdat
data :
lv_gbdat
type lfa1-gbdat.

loop at t_regup.
* Checking gbdat if it is less than payment date
select single gbdat
into lv_gbdat
from lfa1
where lifnr eq t_regup-lifnr.
if sy-subrc eq 0.
if lv_gbdat is not initial.
if lv_gbdat LT t_regup-LAUFD.
t_regup
-XIGNO = 'X'.
modify t_regup INDEX sy-tabix from t_regup transporting XIGNO.
clear: t_regup, lv_gbdat.
endif.
else.
endif.
else.
endif.
endloop.


Testing

For example I have 2 invoices to be paid for the vendors – 100214 and 102165.


 

I have maintained date(GBDAT) in vendor Master for vendor-100214


 

 

 

F110 RUN


 

Proposal Display

As date in LFA1-GBDAT for vendor 100214 is 22.10.2013 which is less than payment date that is 23.10.2013 so the payment for 100214 is stopped.



Proposal Log


 

Payment Advice in SOST

Payment Advice got generated for only right vendor which got paid that is 102165 only.


 

FBL1N Vendor 100214 is not paid but vendor 102165 is paid.


 

This explains how to restrict payments to Vendor under certain conditions. Good Luck..!!!

 

Thanks..!!! VEnk@

Change Pointers in LOIPRO

$
0
0

Could someone please provide me a step by step way to configure a change pointer in LOIPRO?  From what I have gathered there isn't a way to configure the change pointer but there is a method using transaction NACE.  Any solution at this point would be greatly appreciated.

 

Points will be rewarded for assistance.


hi everybody. This code is join part broken :( help me

$
0
0

TABLES : t001 ,bseg ,bkpf ,knb1 , kna1 ,knvv.



" BSEG TABLOSU

DATA : BEGIN OF i_bseg OCCURS 0,

       gsber LIKE bseg-gsber, "İŞ ALANI

       umskz LIKE bseg-umskz, "ÖDK ALANI

  END OF i_bseg.







"T001 TABLOSU

DATA : BEGIN OF i_t001 OCCURS 0,

      bukrs LIKE t001-bukrs, "ŞİRKET KODU

  END OF i_t001.



"BKPF TABLOSU

DATA  : BEGIN OF i_bkpf OCCURS 0,

        blart LIKE bkpf-blart, "BELGE TÜRÜ

      END OF i_bkpf.

"KNB1 TABLOSU

DATA : BEGIN OF i_knb1 OCCURS 0 ,

    kunnr LIKE knb1-kunnr, " MÜŞTERİ HESAP

  END OF i_knb1.



"KNA1 TABLOSU

DATA  :BEGIN OF i_kna1 OCCURS 0,

       ktokd LIKE kna1-ktokd, "HESAP GRUBU

  END OF i_kna1.

"KNVV TABLOSU

DATA : BEGIN OF i_knvv OCCURS 0,

      kdgrp LIKE knvv-kdgrp, " MÜŞTERİ GRUBU

  END OF i_knvv.



"TÜM ALANLARI BURADA BİRLEŞTİRDİK.

DATA : BEGIN OF itab OCCURS 0,

       gsber LIKE i_bseg-gsber, "İŞ ALANI

       umskz LIKE i_bseg-umskz, "ÖDK ALANI

       bukrs LIKE i_t001-bukrs, "ŞİRKET KODU

       blart LIKE i_bkpf-blart, "BELGE TÜRÜ

       kunnr LIKE i_knb1-kunnr, " MÜŞTERİ HESAP

       ktokd LIKE i_kna1-ktokd, "HESAP GRUBU

       kdgrp LIKE i_knvv-kdgrp, " MÜŞTERİ GRUBU

  END OF itab.

""PERFORMLAR

PERFORM get_data.







"hesap türü alanı

SELECTION-SCREEN BEGIN OF BLOCK hsptur WITH FRAME TITLE hsptr.

SELECT-OPTIONS : s_bukrs FOR t001-bukrs DEFAULT 4000,

                 s_gsber FOR bseg-gsber,

                 s_blart FOR bkpf-blart,

                 s_umskz FOR bseg-umskz DEFAULT 2.

SELECTION-SCREEN END OF BLOCK hsptur.

"tarih tipi

SELECTION-SCREEN BEGIN OF BLOCK trhtip WITH FRAME TITLE thtp.

SELECTION-SCREEN BEGIN OF LINE .



PARAMETERS  :   beltar  RADIOBUTTON GROUP trtp  DEFAULT 'X'.

SELECTION-SCREEN COMMENT 10(15) text-c01 FOR FIELD beltar.

PARAMETERS  :    kyttar RADIOBUTTON GROUP  trtp .

SELECTION-SCREEN COMMENT 40(15) text-c02 FOR FIELD kyttar.

PARAMETERS  :   grstar RADIOBUTTON GROUP  trtp .

SELECTION-SCREEN COMMENT 70(15) text-c03 FOR FIELD grstar.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK trhtip.









"belge tarihi



SELECTION-SCREEN BEGIN OF BLOCK blgtar WITH FRAME TITLE blgtr.

SELECTION-SCREEN BEGIN OF LINE .



PARAMETERS  :  bgn  RADIOBUTTON GROUP bltr  .

SELECTION-SCREEN COMMENT 10(15) text-r01 FOR FIELD bgn.

PARAMETERS  :  chft RADIOBUTTON GROUP  bltr .

SELECTION-SCREEN COMMENT 30(15) text-r02 FOR FIELD chft.

PARAMETERS  :  cray RADIOBUTTON GROUP  bltr  DEFAULT 'X'.

SELECTION-SCREEN COMMENT 50(15) text-r03 FOR FIELD cray .

PARAMETERS  :  crayil RADIOBUTTON GROUP  bltr .

SELECTION-SCREEN COMMENT 75(15) text-r04  FOR FIELD crayil.





SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS dgr RADIOBUTTON GROUP bltr .

SELECTION-SCREEN COMMENT 10(15) text-r05 FOR FIELD dgr.

SELECT-OPTIONS dates FOR sy-datlo .

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF  LINE .

PARAMETERS : c_br AS CHECKBOX .

SELECTION-SCREEN COMMENT 10(25) text-c07 FOR FIELD c_br.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK blgtar.











"1. screen alanı

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS : c_ms AS CHECKBOX.

SELECTION-SCREEN COMMENT 10(25) text-c10 FOR FIELD c_ms.

SELECTION-SCREEN END OF LINE.

SELECT-OPTIONS : s_kunnr FOR knb1-kunnr,

                 s_ktokd FOR kna1-ktokd,

                 s_kdgrp FOR  knvv-kdgrp.





SELECTION-SCREEN END OF SCREEN 100.

"2. screen alanı

SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS : c_ms1 AS CHECKBOX.

SELECTION-SCREEN COMMENT 10(25) text-c09 FOR FIELD c_ms1.

SELECTION-SCREEN END OF LINE.

PARAMETERS : p1 TYPE c LENGTH 10,

             p2 TYPE c LENGTH 10,

             p3 TYPE c LENGTH 10.





SELECTION-SCREEN END OF SCREEN 200.

" 3. screen alanı

SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.

SELECTION-SCREEN  BEGIN OF BLOCK blc3 WITH FRAME TITLE bl3 NO INTERVALS.





SELECTION-SCREEN END OF BLOCK blc3.

SELECTION-SCREEN END OF SCREEN 300.

SELECTION-SCREEN : BEGIN OF TABBED BLOCK blc1 FOR 10 LINES,

  TAB (20)  buton1 USER-COMMAND p1  ,

  TAB (20)  buton2 USER-COMMAND p2,

   TAB (20) buton3 USER-COMMAND usr3 ,

  END OF BLOCK blc1.







INITIALIZATION.

  hsptr = 'HESAP TÜRÜ'.

  thtp =  'TARİH TİPİ'.

  buton1 = 'MÜŞTERİ HESABI'.

  buton2 = 'SATICI HESABI'.

  buton3 = 'SATICI HESABI'.

  blgtr = 'BELGE TARİHİ'.

  blc1-prog = sy-repid.

  blc1-dynnr = 200.

  blc1-activetab = 'P2'.



AT SELECTION-SCREEN.

  CASE sy-dynnr.

    WHEN 1000.

      CASE sy-ucomm.

        WHEN 'P1'.

          blc1-dynnr = 100.

        WHEN 'P2'.

          blc1-dynnr = 200.



      ENDCASE.



  ENDCASE.



*&---------------------------------------------------------------------*

*&      Form  get_data

*&---------------------------------------------------------------------*

*       text

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

FORM get_data.

  SELECT t001~bukrs  bkpf~blart

         knb1~kunnr kna1~ktokd knvv~kdgrp

    INTO CORRESPONDING FIELDS OF TABLE itab

         FROM t001 INNER JOIN bkpf

         ON t001~bukrs = bkpf~bukrs

         INNER JOIN knb1

         ON t001~bukrs = knb1~bukrs

         INNER JOIN  kna1

         ON  kna1~kunnr = knb1~kunnr

         INNER JOIN knvv

         ON kna1~kunnr = knvv~kunnr

    WHERE t001-bukrs IN s_bukrs AND

          bseg-gsber IN s_gsber AND

          bkpf-blart IN s_blart AND

          bseg-umskz IN s_umskz.



ENDFORM.                    "get_data

RE: Can we Execute Smart form Print program by pressing the push button on the selection screen

$
0
0

Hi,

 

   I have a requirement that, after giving the inputs in various input fields in the selection screen, If i press one custom push button(which i created) on the selection screen, is it possible to execute the smart form print program in the background after pressing the push button.

 

 

helpful answers will be rewarded with points

SQ02 - Plant Maintenance Report

$
0
0


Hi all,

 

I'm trying to create a report that links water measurement documents to functional locations.

 

I currently have IMRG - IMPTT - EQUI - EQUZ - ILOA.

 

I want to retrieve the functional location site name, which is IFLO-PLTXT. The problem is the equipment numbers are linked to functional locations at different levels (C, D, E etc), but i want the functional location name from level B only. Would it be possible to do a select statement on IFLO using the first 11 characters of the functional location from ILOA?

 

Eg functional location is SA02-123456-01-012, i need to select SA02-123456 into IFLO-TPLNR.

 

I would also like to retrieve IHPA-PARNR for the B level functional location from IHPA, where IHPA-PARVW =  ZB, ZC or ZE.

 

Is this possible in SQ02?

 

Many thanks and kind regards,

 

Dave

"Field name in SQL statement is too long" error in SAP ECC 4.6, not in SAP ECC 6.

$
0
0

We encountered the following SAP error in SAP ECC 4.6 system, but not in SAP ECC 6.
Does anyone know when SAP fixed this issue?

 

Caused by: RfcException: [UB6|m61il02]
    message: Field name in SQL statement is too long.
    Return code: RFC_SYS_EXCEPTION(3)
    error group: 104
    key: RFC_ERROR_SYSTEM_FAILURE
Exception raised by UB6|m61il02

at com.sap.conn.rfc.engine.RfcIoOpenCntl.RfcReceive(RfcIoOpenCntl.java:2034)
at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.execute(MiddlewareJavaRfc.java:1764)
... 13 more
Caused by: com.sap.conn.rfc.exceptions.RfcGetException: Field name in SQL statement is too long.
at com.sap.conn.rfc.engine.RfcImp.ab_rfcerror(RfcImp.java:1157)

Error when generating the selection screen "1000" of report

$
0
0

authobj.png
Hi all,

 

I am doing six authorization objects.

 

For five authorization object there is no error.But then i am trying to code for the sixth authorization object, while activating it is showing an error as

"Error when generating the selection screen "1000" of report"

Integrating PGP encryption in SAP

$
0
0

Hey Friends,

 

I am working on a banking project.

The requirement of this project is tht i have to extract contents from different table into a notepad file and store it into a server depending on certain selection criteria.

i am able to do tht. Bt as it is related to bank v hav to encrypt this file after it is extracted using PGP encryption and keep it in the server itself.

v hav the code ready for doin PGP encryption and v hav verified doin it through cmd prompt.

bt there is an issue of integratin it wit SAP.

 

v know tht v hav to use sm69 . bt in tht wht

'operating system command' , 'parameters' , 'additional parameters' values has to provided is an issue.

 

the value that v have provided in

'operating system command' - path where .pgp file resides (which is used to encrypt)

'parameters' , 'additional parameters' -> v hav kept blank.

 

IT gives us an error:

Can't exec external program (Unknown error)

WaitForSingleObject failedwith %d (No such device or address)

 

v r usin the function module 'SXPG_COMMAND_EXECUTE' in our ABAP code

 

Can anyone help?

Flat file upload to SAP

$
0
0

Hello All,

 

We are getting a Mainframe text file to upload the data to SAP. We need to Post FI documents using FB01 transaction.

 

Before that to upload data using a program (we cannot use LSMW here).

 

The fixed length file has Header, Item and Footer records. For eg:

 

H123ABC TEST           #

LATGHJKL 1230994 1500

LATGLKJK 3455699 1600

H123ABC FOOTER     #*

 

Any inputs on how can we upload this data to SAP?

 

Thanks!

 

Sandy


Change the System Status of Sales Order Based On BAPI_SALESORDER_CHANGE

$
0
0

Dear Genies,

                 My Customer wants the Mass Update of system status locked and unlocked in Sales Order.

I have found the BAPI for mass update but i don't know the where i need to pass the value. searched the documents and sample code

finally got some result but not more helpful for system status change. Please anyone share your knowledge...

 

 

would be nice if someone answer satisfies my requirements..

 

Thanks in advance..

 

Regards,

   Thangam.P

present i am using abap online server ECC 6.0 .webdynpro is not working

$
0
0

in my system webdynpro is not working ..plz tel me any reason for that

Giving selection conditions in Database view

$
0
0

Hello Everyone,

I have a database view. I need to give some conditions . Not able to fiure out how should I proceed.

I know the section where to put the selection conditions.

My condition is :

Table1-field2 eq 'X' and ( Table1- field1  eq 'X'  or( Table2-field1 eq 'X' and Table2-field2 eq 'X' )) and

i am not able to implement the highlighted part. How can I give this nesting in the conditions.

 

Kindly give your inputs.

 

Thanks & Regards,

Rohit

Error- 'TABLES parameters are obsolete' while Creating itab in function module

$
0
0

I tried to pass value Using Internal table . but I could't Enter the value there.. 

 

I tried with,

 

Parameter Name --> it

Typing                --> type standard table of  

                         (or)

                         --> type

                         --> like

Associated Type--> MARA.

 

But here i got the error message " TABLES parameters are obsolete" i tried with all 1.type standard table of, 2.type, 3. like.   i didn't work . What to give in Typing field ? can anyone help me ?

split a string into line

$
0
0

Hi Gurus,

 

I want to split a particular string into lines. I have a string concatenate by values separated by semicoloumn.While print this string in smartform have to print into several rows. but I dont know the exctact length of the field concatenated into a string. My requirement is to split the string into lines but each line have to end with semicoloum, that is all values have to end in a particlar line should not continue on a next line.

 

Foe eg:

 

Var1 = 'abcdef'

var2 = 'qwert'

var3 = 'asdfghjkl'.

String = var1;var2;var3.

 

in printform have to print in a line with length 20 means

Output should be in the below format:

line1 - abcedf;qwert;

line2 - asdfghjkl.

 

Even there is some space in line1 to hold var3, but i want it in a next line.

 

Thanks in advance.

Reagrds,

Bhuvana.

Viewing all 8332 articles
Browse latest View live


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