Skip to Content
author's profile photo Former Member
Former Member

Internal table field have zero(BPID) but I entry without zero this code doesn't work there is no entry

"İnternal Table...

DATA : BEGIN OF itab occurs 0 ,

ename LIKE PA0001-ename ,

begdt LIKE /ATOM/PJ50-begdt , "Başlangıç Tarihi

pjdaycn LIKE /ATOM/PJ01-pjdaycn , "Proje Gün sayısı

pjid LIKE /ATOM/PJ50-PJID , "Proje id

bpid LIKE /ATOM/PJ50-BPID , "Personel id "----THİS FİELD

pjtx LIKE /ATOM/PJ01-PJTX , "Proje texti

pjlx LIKE /ATOM/PJ01-PJLX , "Proje uzun texti

psid LIKE /ATOM/PJ50-PSID , "Alt Proje id

pstx LIKE /ATOM/PJ02-PSTX , "Alt proje texti

whour LIKE /ATOM/PJ50-WHOUR , "Aktivite Saati

ahour LIKE /ATOM/PJ50-AHOUR , "Fatura Saati

txt01 LIKE /ATOM/PJ50-TXT01 , "Fatura texti

txt02 LIKE /ATOM/PJ50-TXT02 , "Fatura2 texti

cellcolor TYPE lvc_t_scol ,

END OF itab.

SELECT-OPTIONS s_pernr FOR itab-BPID .

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_pernr-low.

PERFORM F4_HELP.

AT SELECTION-SCREEN.

PERFORM SELECTION.

PERFORM DEL_ZERO.

FORM SELECTİON.

SELECT * INTO CORRESPONDING FIELDS OF TABLE itab

FROM /ATOM/PJ50 AS

M2 INNER JOIN /ATOM/PJ01 AS M1

ON M2~PJID EQ M1~PJID

where M2~begdt IN s_ac_beg AND

M1~pjdaycn IN s_pjday AND

M1~pjıd IN s_pjid AND

M1~pjtx IN s_pjtxt AND

M2~bpid IN s_pernr AND

M2~whour IN s_hour AND

M2~ahour IN a_hour AND

M2~txt01 IN s_txt1 AND

M2~txt02 IN s_txt2 AND

begdt le sy-datum.

SORT itab BY PJID.

LOOP AT itab.

SELECT SINGLE PSTX

FROM /ATOM/PJ02 INTO itab-pstx

WHERE PSID EQ ITAB-PSID

AND pstx IN s_pstx.

SELECT SINGLE ename

FROM pa0001

INTO itab-ename

WHERE pernr EQ itab-bpid.

SHIFT itab-bpid LEFT DELETING LEADING '0'.

SHIFT itab-psid LEFT DELETING LEADING '0'.

SHIFT itab-pjid LEFT DELETING LEADING '0'.

SHIFT gx_bpid LEFT DELETING LEADING '0'.

MODIFY itab.

ENDLOOP.

ENDFORM.

//THİS F4 HELP FOR I WANNA DELETE ZERO FİELD USİNG SELECT-OPTİON

FORM F4_HELP.

SELECT BPID from /ATOM/PJ50 into table gs_itab.

LOOP AT gs_itab.

SHIFT gs_itab-bpid LEFT DELETING LEADING '0'.

modify gs_itab.

DELETE ADJACENT DUPLICATES FROM gs_itab COMPARING bpid.

ENDLOOP.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'BPID'

DYNPPROG = sy-repid

DYNPNR = sy-dynnr

DYNPROFIELD = 'S_PERNR'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = gs_itab.

ENDFORM.

"!!! FİNALLY CODE "THIS IS NOT WORK (THERE İS NO ENTRY) !!!

FORM DEL_ZERO.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

input = itab-bpid

IMPORTING

output = itab-bpid.

ENDFORM.

THANKS.

Message was edited by: Matthew Billingham

Add a comment
10|10000 characters needed characters exceeded

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2014 at 11:13 AM

    Hi,

    One thing is for sure...In your form DEL_ZERO, you forgot to loop at ITAB 😉

    Cheers,

    Manu.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 11, 2014 at 02:26 PM

    Hi,

    Did you check the conversion type(ALPHA) of the data element for the bpid type you are using??

    Regards,

    Deepika.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 11, 2014 at 04:13 PM

    Please note. if you put your subject in ALL CAPITALS you run the risk of a moderator rejecting your question. Do not type in ALL CAPITALS. This time I've edited it for you.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 11, 2014 at 02:57 PM

    In this code you are updating only current row. Do one thing call the "PERFORM DEL_ZERO" inside the loop of itab.


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2014 at 08:30 PM

    Well function doesn't work Can i using unpack or pack ? and How can i using those?

    Note: s_pernr is Select Option and for itab-bpid fields.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2014 at 09:08 PM

    One more thing field(itab-bpid) Length:8

    So i try this

    DATA C1(8) TYPE C.

    FORM DEL_ZERO.

    LOOP AT itab.

    UNPACK itab-bpid TO C1.

    MOVE C1 TO s_pernr.

    ENDLOOP.

    ENDFORM.

    but doesn't work 😔

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.